Instance Property


True if resource should be excluded from backups, false otherwise.


var isExcludedFromBackup: Bool? { get set }


This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents.

See Also

Universal Resource Values

var addedToDirectoryDate: Date?

The date the resource was created, or renamed into or within its parent directory.

var allValues: [URLResourceKey : Any]

A loosely-typed dictionary containing all keys and values.

var attributeModificationDate: Date?

The time the resource’s attributes were last modified.

var canonicalPath: String?

The URL’s path as a canonical absolute file system path.

var contentAccessDate: Date?

The date the resource was last accessed.

var contentModificationDate: Date?

The time the resource content was last modified.

var creationDate: Date?

The date the resource was created.

var generationIdentifier: (NSCopying & NSSecureCoding & NSObjectProtocol)?

An opaque generation identifier which can be compared using == to determine if the data in a document has been modified.

var hasHiddenExtension: Bool?

True for resources whose filename extension is removed from the localized name property.

var isAliasFile: Bool?

true if the resource is a Finder alias file or a symlink, false otherwise

var isHidden: Bool?

True for resources normally not displayed to users.

var isPackage: Bool?

True for packaged directories.

var isReadable: Bool?

True if this process (as determined by EUID) can read the resource.

var isSymbolicLink: Bool?

True for symlinks.

var isSystemImmutable: Bool?

True for system-immutable resources.

var isUserImmutable: Bool?

True for user-immutable resources

var isWritable: Bool?

True if this process (as determined by EUID) can write to the resource.

var labelNumber: Int?

The label number assigned to the resource.

var linkCount: Int?

Number of hard links to the resource.

var localizedLabel: String?

The user-visible label text.

var localizedName: String?

Localized or extension-hidden name as displayed to users.

var localizedTypeDescription: String?

User-visible type or “kind” description.

var name: String?

The resource name provided by the file system.

var parentDirectory: URL?

The resource’s parent directory, if any.

var path: String?

The URL’s path as a file system path.

var preferredIOBlockSize: Int?

The optimal block size when reading or writing this file’s data, or nil if not available.

var quarantineProperties: [String : Any]?

The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass nil as the value when setting this property.

var tagNames: [String]?

The array of Tag names.

var typeIdentifier: String?

Uniform type identifier (UTI) for the resource.