I found this declaration in Apple's API reference but I'm not sure how to use it.
func createFile(atPath path: String, contents data: Data?, attributes attr: [String : Any]? = nil) -> Bool
When I start typing createFile
, there is no auto-complete that resembles this declaration either.
My path is a directory on my computer (not including the file's name), and the data is a string.