nvzqz/FileKit

Cannot create directory/file with name has slash character.

haithngn opened this issue · 1 comments

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