var isDirectory: ObjCBool = false
if fileManager.fileExists(atPath: path, isDirectory: &isDirectory) {
if isDirectory.boolValue {
print("\(path) 是文件夹")
} else {
print("\(path) 是文件")
}
} else {
print("路径不存在")
}
52yaoer
- 发布:2024-04-10 16:25
- 更新:2024-04-10 16:47
- 阅读:69
52yaoer (作者)
那可以告诉我下。 类似这种 &isDirectory 或者 &err 这种写法 怎么在uts实现么?
2024-04-10 16:58