Skip to content

Instantly share code, notes, and snippets.

@maximbilan
Created February 6, 2016 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximbilan/b7a747eb9a56a5d5e54b to your computer and use it in GitHub Desktop.
Save maximbilan/b7a747eb9a56a5d5e54b to your computer and use it in GitHub Desktop.
iCloudIssue.swift
let directories = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true)
if let documentDirectory = directories.first {
do {
let documents = try NSFileManager.defaultManager().contentsOfDirectoryAtPath(documentDirectory)
for files in documents {
let urlForm = NSURL.fileURLWithPath(documentDirectory + "/" + files)
do {
try print("\(files): \(urlForm.resourceValuesForKeys([NSURLIsExcludedFromBackupKey]))")
} catch {
print("can't find key")
}
}
} catch {
print("can't retrieve contents")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment