nvzqz / FileKit

Simple and expressive file management in Swift
https://nvzqz.github.io/FileKit/docs/
MIT License
2.34k stars 207 forks source link

Is there a way to write files to icloud using file kit? #63

Open IgorMuzyka opened 6 years ago

IgorMuzyka commented 6 years ago

If yes then what the path that should be used and what changes are required for xcode project to support icloud on macOS

IgorMuzyka commented 6 years ago

I'm sure i can just use this as path "~/Library/Mobile Documents/com~apple~CloudDocs/" and asking a user for access to this directory. But was interested if maybe there is a better way?

phimage commented 6 years ago

I think there is no utility method to do it in FileKit

We could add it by using https://developer.apple.com/documentation/foundation/filemanager/1411653-url

extension Path {
 public init?(ubiquityContainerIdentifier: URL) {
        // call the method with guar
        init(url: xxxx)
  }
}