//documents
let documents = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
print(documents[0])
//library
let library = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true)
print(library[0])
//library/cache
let cache = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)
print(cache[0])
//library/preferences
let preferences = library[0] + "/Preferences"
print(preferences)
//tmp
let tmp = NSTemporaryDirectory()
print(tmp)
//NSHomeDirectory() 沙盒根目录
let tmp1 = NSHomeDirectory() + "/tmp"
print(tmp1)