metadata.fileName = "root"
metadata.fileNameView = "root"
metadata.serverUrl = ncAccount.serverUrl
- metadata.classFile = NKCommon.typeClassFile.directory.rawValue
+ metadata.classFile = NKCommon.TypeClassFile.directory.rawValue
completionHandler(FileProviderItem(metadata: metadata, parentItemIdentifier: NSFileProviderItemIdentifier.rootContainer, ncKit: ncKit), nil)
return Progress()
metadata.size = file.size
metadata.classFile = file.classFile
//FIXME: iOS 12.0,* don't detect UTI text/markdown, text/x-markdown
- if (metadata.contentType == "text/markdown" || metadata.contentType == "text/x-markdown") && metadata.classFile == NKCommon.typeClassFile.unknow.rawValue {
- metadata.classFile = NKCommon.typeClassFile.document.rawValue
+ if (metadata.contentType == "text/markdown" || metadata.contentType == "text/x-markdown") && metadata.classFile == NKCommon.TypeClassFile.unknow.rawValue {
+ metadata.classFile = NKCommon.TypeClassFile.document.rawValue
}
if let date = file.uploadDate {
metadata.uploadDate = date as Date
if isDocumentViewableOnly {
return false
}
- if ["application/pdf", "com.adobe.pdf"].contains(contentType) || contentType.hasPrefix("text/") || classFile == NKCommon.typeClassFile.image.rawValue {
+ if ["application/pdf", "com.adobe.pdf"].contains(contentType) || contentType.hasPrefix("text/") || classFile == NKCommon.TypeClassFile.image.rawValue {
return true
}
return false
var isDocumentViewableOnly: Bool {
return sharePermissionsCollaborationServices == SharePermissions.readShare.rawValue &&
- classFile == NKCommon.typeClassFile.document.rawValue
+ classFile == NKCommon.TypeClassFile.document.rawValue
}
var isCopyableInPasteboard: Bool {
if directory || isDocumentViewableOnly {
return false
}
- return contentType == "com.adobe.pdf" || contentType == "application/pdf" || classFile == NKCommon.typeClassFile.image.rawValue
+ return contentType == "com.adobe.pdf" || contentType == "application/pdf" || classFile == NKCommon.TypeClassFile.image.rawValue
}
var isSettableOnOffline: Bool {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
requirement = {
- branch = "work/unsharedify-nckit";
+ branch = "develop";
kind = branch;
};
};