func addSkipBackupAttributeToItemAtURL(url){
do {
var resourceValues = URLResourceValues()
resourceValues.isExcludedFromBackup = true
try url.setResourceValues(resourceValues)
} catch {
print(error.localizedDescription)
}
}
addSkipBackupAttributeToItemAtURL(url)
url: file url pass and call when store on desired directory