0

I am trying to create multiple files in a folder picked by user using UIDocumentPickerViewController with UTType.Folder.

I am able to create subfolders by appending to the NSUrl and using NSFileManager createDirectoryAtURL, but there is no createFileAtURL method, only createFileAtPath. This should work for local files, but is there a general way to create a file in any picked location, even if it were a third-party cloud provider?

Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
  • What does "create" mean here? You can create a file at a given URL just by starting with some Data and telling it to `write` to that URL. You don't need a file manager method to do that. – matt Mar 09 '21 at 03:49
  • I am looking for something like "touch" on Unix. Basically, want to be able to create an empty file, which could later be either written to, or not. – Martin Zikmund Mar 09 '21 at 10:00

0 Answers0