Closed haithngn closed 6 years ago
let shared = Path.userDocuments let x = shared + "h/ai" try? x.createDirectory(withIntermediateDirectories: true) let sample = TextFile(path: shared/"filekit_sample.txt") try? sample.write("Hello there!") try? sample.read()
This code always create two directory h and sub directory ai.
/ is a file system separator You cannot do it
/
touch a/a touch: a/a: No such file or directory
This code always create two directory h and sub directory ai.