Post

Replies

Boosts

Views

Activity

how to check if a file is in trash or not
iOS 12.1.0 + Xcode 10.1I am using URLs with bookmarks to keep recents.When I trashed a file, its bookmark results a URL in a trash.If the trashed file was located in my iPad, I can check if the file is in the current user's trash.do { var relationship = FileManager.URLRelationship.other try FileManager.default.getRelationship(&relationship, ofDirectoryAt: trashUrl, toItemAt: url) if relationship == .contains { return true }} catch { print(error.localizedDescription)}If the trashed file was in iCloud or any other clouds, how can I check if the file is in trash or not?Thank you~ ^^
7
0
2.9k
Nov ’18