52yaoer
52yaoer
  • 发布:2024-04-10 16:25
  • 更新:2024-04-10 16:47
  • 阅读:69

uts中,ios判断是否是文件夹的代码应该怎么转换,有一个&isDirectory如何用uts写?

分类:uts
var isDirectory: ObjCBool = false  
if fileManager.fileExists(atPath: path, isDirectory: &isDirectory) {  
    if isDirectory.boolValue {  
        print("\(path) 是文件夹")  
    } else {  
        print("\(path) 是文件")  
    }  
} else {  
    print("路径不存在")  
}
2024-04-10 16:25 负责人:无 分享
已邀请:
DCloud_App_Array

DCloud_App_Array

ios平台uts插件暂不支持使用文件管理器对象

  • 52yaoer (作者)

    那可以告诉我下。 类似这种 &isDirectory 或者 &err 这种写法 怎么在uts实现么?

    2024-04-10 16:58

要回复问题请先登录注册