nvzqz / FileKit

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

Cannot create directory/file with name has slash character. #56

Closed haithngn closed 6 years ago

haithngn commented 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.

phimage commented 6 years ago

/ is a file system separator You cannot do it

touch a/a
touch: a/a: No such file or directory