URLs to file system resources support the properties defined below.
Note that not all property values will exist for all file system URLs. For example, if a file is located on a volume that does not support creation dates, it is valid to request the creation date property, but the returned value will be nil, and no error will be generated.
Only the fields requested by the keys you pass into the `URL` function to receive this value will be populated. The others will return `nil` regardless of the underlying property on the file system. As a convenience, volume resource values can be requested from any file system URL. The value returned will reflect the property value for the volume on which the resource is located.
Members (128)
get · iOS 8.0+
allValues
TypeScript
get allValues(): NativeMap<URLResourceKey, unknown>
Swift declaration
var allValues: [URLResourceKey : Any] { get }
A loosely-typed dictionary containing all keys and values.
If you have set temporary keys or non-standard keys, you can find them in here.
get · iOS 8.0+
isReadable
TypeScript
get isReadable(): (boolean) | null
Swift declaration
var isReadable: Bool? { get }
True if this process (as determined by EUID) can read the resource.
get · iOS 8.0+
isWritable
TypeScript
get isWritable(): (boolean) | null
Swift declaration
var isWritable: Bool? { get }
True if this process (as determined by EUID) can write to the resource.
get · iOS 8.0+
volumeName
TypeScript
get volumeName(): (string) | null
Swift declaration
var volumeName: String? { get set }
The name of the volume
set · iOS 8.0+
volumeName
TypeScript
set volumeName(value: (string) | null)
Swift declaration
var volumeName: String? { get set }
The name of the volume
get · iOS 8.0+
isAliasFile
TypeScript
get isAliasFile(): (boolean) | null
Swift declaration
var isAliasFile: Bool? { get }
true if the resource is a Finder alias file or a symlink, false otherwise
- note: Only applicable to regular files.
get · iOS 8.0+
isDirectory
TypeScript
get isDirectory(): (boolean) | null
Swift declaration
var isDirectory: Bool? { get }
True for directories.
get · iOS 14.0+
isPurgeable
TypeScript
get isPurgeable(): (boolean) | null
Swift declaration
var isPurgeable: Bool? { get }
True if the file can be deleted by the file system when asked to free space.
get · iOS 8.0+
labelNumber
TypeScript
get labelNumber(): (number) | null
Swift declaration
var labelNumber: Int? { get set }
The label number assigned to the resource.
set · iOS 8.0+
labelNumber
TypeScript
set labelNumber(value: (number) | null)
Swift declaration
var labelNumber: Int? { get set }
The label number assigned to the resource.
get · iOS 8.0+
creationDate
TypeScript
get creationDate(): (globalThis.Date) | null
Swift declaration
var creationDate: Date? { get set }
The date the resource was created.
set · iOS 8.0+
creationDate
TypeScript
set creationDate(value: (globalThis.Date) | null)
Swift declaration
var creationDate: Date? { get set }
The date the resource was created.
get · iOS 8.0+
fileSecurity
TypeScript
get fileSecurity(): (NSFileSecurity) | null
Swift declaration
var fileSecurity: NSFileSecurity? { get set }
The file system object's security information encapsulated in a FileSecurity object.
set · iOS 8.0+
fileSecurity
TypeScript
set fileSecurity(value: (NSFileSecurity) | null)
Swift declaration
var fileSecurity: NSFileSecurity? { get set }
The file system object's security information encapsulated in a FileSecurity object.
get · iOS 8.0+
isExecutable
TypeScript
get isExecutable(): (boolean) | null
Swift declaration
var isExecutable: Bool? { get }
True if this process (as determined by EUID) can execute a file resource or search a directory resource.
get · iOS 10.0+
canonicalPath
TypeScript
get canonicalPath(): (string) | null
Swift declaration
var canonicalPath: String? { get }
The URL's path as a canonical absolute file system path.
get · iOS 9.0+
isApplication
TypeScript
get isApplication(): (boolean) | null
Swift declaration
var isApplication: Bool? { get }
True if resource is an application.
get · iOS 8.0+
isRegularFile
TypeScript
get isRegularFile(): (boolean) | null
Swift declaration
var isRegularFile: Bool? { get }
True for regular files.
get · iOS 8.0+
localizedName
TypeScript
get localizedName(): (string) | null
Swift declaration
var localizedName: String? { get }
Localized or extension-hidden name as displayed to users.
get · iOS 8.0+
totalFileSize
TypeScript
get totalFileSize(): (number) | null
Swift declaration
var totalFileSize: Int? { get }
Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available.
- note: Only applicable to regular files.
get · iOS 8.0+
volumeIsLocal
TypeScript
get volumeIsLocal(): (boolean) | null
Swift declaration
var volumeIsLocal: Bool? { get }
True if the volume is stored on a local device.
get · iOS 16.4+
volumeSubtype
TypeScript
get volumeSubtype(): (number) | null
Swift declaration
var volumeSubtype: Int? { get }
Returns the file system subtype.
get · iOS 16.4+
fileIdentifier
TypeScript
get fileIdentifier(): (number) | null
Swift declaration
var fileIdentifier: UInt64? { get }
The file system's internal inode identifier for the item. This value is not stable for all file systems or
across all mounts, so it should be used sparingly and not persisted. It is useful, for example, to match URLs from
the URL enumerator with paths from FSEvents.
get · iOS 9.0+
fileProtection
TypeScript
get fileProtection(): (URLFileProtection) | null
Swift declaration
var fileProtection: URLFileProtection? { get }
The protection level for this file
get · iOS 8.0+
isMountTrigger
TypeScript
get isMountTrigger(): (boolean) | null
Swift declaration
var isMountTrigger: Bool? { get }
True if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory.
get · iOS 8.0+
isSymbolicLink
TypeScript
get isSymbolicLink(): (boolean) | null
Swift declaration
var isSymbolicLink: Bool? { get }
True for symlinks.
get · iOS 8.0+
localizedLabel
TypeScript
get localizedLabel(): (string) | null
Swift declaration
var localizedLabel: String? { get }
The user-visible label text.
get · iOS 8.0+ · Deprecated in iOS 100000.0
typeIdentifier
TypeScript
get typeIdentifier(): (string) | null
Swift declaration
var typeIdentifier: String? { get }
Uniform type identifier (UTI) for the resource.
get · iOS 16.4+
volumeTypeName
TypeScript
get volumeTypeName(): (string) | null
Swift declaration
var volumeTypeName: String? { get }
Returns the name of the file system type.
get · iOS 8.0+
isUserImmutable
TypeScript
get isUserImmutable(): (boolean) | null
Swift declaration
var isUserImmutable: Bool? { get set }
True for user-immutable resources
set · iOS 8.0+
isUserImmutable
TypeScript
set isUserImmutable(value: (boolean) | null)
Swift declaration
var isUserImmutable: Bool? { get set }
True for user-immutable resources
get · iOS 8.0+
parentDirectory
TypeScript
get parentDirectory(): (string) | null
Swift declaration
var parentDirectory: URL? { get }
The resource's parent directory, if any.
get · iOS 8.0+
fileResourceType
TypeScript
get fileResourceType(): (URLFileResourceType) | null
Swift declaration
var fileResourceType: URLFileResourceType? { get }
Returns the file system object type.
get · iOS 8.0+
isUbiquitousItem
TypeScript
get isUbiquitousItem(): (boolean) | null
Swift declaration
var isUbiquitousItem: Bool? { get }
True if this item is synced to the cloud, false if it is only a local file.
get · iOS 8.0+
volumeIdentifier
TypeScript
get volumeIdentifier(): ((SDKHandle) & (SDKHandle) & (SDKHandle)) | null
Swift declaration
var volumeIdentifier: (any NSCopying & NSSecureCoding & NSObjectProtocol)? { get }
An identifier that can be used to identify the volume the file system object is on.
Other objects on the same volume will have the same volume identifier and can be compared using for equality using `isEqual`. This identifier is not persistent across system restarts.
get · iOS 8.0+
volumeIsInternal
TypeScript
get volumeIsInternal(): (boolean) | null
Swift declaration
var volumeIsInternal: Bool? { get }
True if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available.
get · iOS 8.0+
volumeIsReadOnly
TypeScript
get volumeIsReadOnly(): (boolean) | null
Swift declaration
var volumeIsReadOnly: Bool? { get }
True if the volume is read-only.
get · iOS 8.0+
volumeUUIDString
TypeScript
get volumeUUIDString(): (string) | null
Swift declaration
var volumeUUIDString: String? { get }
The volume's persistent `UUID` as a string, or nil if a persistent `UUID` is not available for the volume.
get · iOS 8.0+
contentAccessDate
TypeScript
get contentAccessDate(): (globalThis.Date) | null
Swift declaration
var contentAccessDate: Date? { get set }
The date the resource was last accessed.
set · iOS 8.0+
contentAccessDate
TypeScript
set contentAccessDate(value: (globalThis.Date) | null)
Swift declaration
var contentAccessDate: Date? { get set }
The date the resource was last accessed.
get · iOS 8.0+
fileAllocatedSize
TypeScript
get fileAllocatedSize(): (number) | null
Swift declaration
var fileAllocatedSize: Int? { get }
Total size allocated on disk for the file in bytes (number of blocks times block size)
- note: Only applicable to regular files.
get · iOS 8.0+
isSystemImmutable
TypeScript
get isSystemImmutable(): (boolean) | null
Swift declaration
var isSystemImmutable: Bool? { get }
True for system-immutable resources.
get · iOS 8.0+
volumeIsBrowsable
TypeScript
get volumeIsBrowsable(): (boolean) | null
Swift declaration
var volumeIsBrowsable: Bool? { get }
True if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume).
get · iOS 8.0+
volumeIsEjectable
TypeScript
get volumeIsEjectable(): (boolean) | null
Swift declaration
var volumeIsEjectable: Bool? { get }
True if the volume's media is ejectable from the drive mechanism under software control.
get · iOS 10.0+
volumeIsEncrypted
TypeScript
get volumeIsEncrypted(): (boolean) | null
Swift declaration
var volumeIsEncrypted: Bool? { get }
True if the volume is encrypted.
get · iOS 8.0+
volumeIsRemovable
TypeScript
get volumeIsRemovable(): (boolean) | null
Swift declaration
var volumeIsRemovable: Bool? { get }
True if the volume's media is removable from the drive mechanism.
get · iOS 8.0+
documentIdentifier
TypeScript
get documentIdentifier(): (number) | null
Swift declaration
var documentIdentifier: Int? { get }
The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume.
The document identifier survives "safe save" operations; i.e it is sticky to the path it was assigned to (`replaceItem(at:,withItemAt:,backupItemName:,options:,resultingItem:) throws` is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes.
get · iOS 8.0+
hasHiddenExtension
TypeScript
get hasHiddenExtension(): (boolean) | null
Swift declaration
var hasHiddenExtension: Bool? { get set }
True for resources whose filename extension is removed from the localized name property.
set · iOS 8.0+
hasHiddenExtension
TypeScript
set hasHiddenExtension(value: (boolean) | null)
Swift declaration
var hasHiddenExtension: Bool? { get set }
True for resources whose filename extension is removed from the localized name property.
get · iOS 8.0+
volumeCreationDate
TypeScript
get volumeCreationDate(): (globalThis.Date) | null
Swift declaration
var volumeCreationDate: Date? { get }
The volume's creation date, or nil if this cannot be determined.
get · iOS 8.0+
volumeIsJournaling
TypeScript
get volumeIsJournaling(): (boolean) | null
Swift declaration
var volumeIsJournaling: Bool? { get }
True if the volume is currently using a journal for speedy recovery after an unplanned restart.
get · iOS 17.0+
directoryEntryCount
TypeScript
get directoryEntryCount(): (number) | null
Swift declaration
var directoryEntryCount: Int? { get }
Returns the count of file system objects contained in the directory. If the URL is not a directory or the file system cannot cheaply compute the value, `nil` is returned.
get · iOS 14.0+
mayShareFileContent
TypeScript
get mayShareFileContent(): (boolean) | null
Swift declaration
var mayShareFileContent: Bool? { get }
True for cloned files and their originals that may share all, some, or no data blocks.
get · iOS 8.0+
volumeIsAutomounted
TypeScript
get volumeIsAutomounted(): (boolean) | null
Swift declaration
var volumeIsAutomounted: Bool? { get }
True if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey.
get · iOS 8.0+
volumeLocalizedName
TypeScript
get volumeLocalizedName(): (string) | null
Swift declaration
var volumeLocalizedName: String? { get }
The user-presentable name of the volume
get · iOS 8.0+
volumeResourceCount
TypeScript
get volumeResourceCount(): (number) | null
Swift declaration
var volumeResourceCount: Int? { get }
Total number of resources on the volume.
get · iOS 8.0+
volumeTotalCapacity
TypeScript
get volumeTotalCapacity(): (number) | null
Swift declaration
var volumeTotalCapacity: Int? { get }
Total volume capacity in bytes.
get · iOS 8.0+
addedToDirectoryDate
TypeScript
get addedToDirectoryDate(): (globalThis.Date) | null
Swift declaration
var addedToDirectoryDate: Date? { get }
The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes.
get · iOS 8.0+
generationIdentifier
TypeScript
get generationIdentifier(): ((SDKHandle) & (SDKHandle) & (SDKHandle)) | null
Swift declaration
var generationIdentifier: (any NSCopying & NSSecureCoding & NSObjectProtocol)? { get }
An opaque generation identifier which can be compared using `==` to determine if the data in a document has been modified.
For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes.
get · iOS 8.0+
isExcludedFromBackup
TypeScript
get isExcludedFromBackup(): (boolean) | null
Swift declaration
var isExcludedFromBackup: Bool? { get set }
True if resource should be excluded from backups, false otherwise.
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.
set · iOS 8.0+
isExcludedFromBackup
TypeScript
set isExcludedFromBackup(value: (boolean) | null)
Swift declaration
var isExcludedFromBackup: Bool? { get set }
True if resource should be excluded from backups, false otherwise.
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.
get · iOS 8.0+
preferredIOBlockSize
TypeScript
get preferredIOBlockSize(): (number) | null
Swift declaration
var preferredIOBlockSize: Int? { get }
The optimal block size when reading or writing this file's data, or nil if not available.
get · iOS 14.0+
fileContentIdentifier
TypeScript
get fileContentIdentifier(): (number) | null
Swift declaration
var fileContentIdentifier: Int64? { get }
A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier.
get · iOS 8.0+
volumeMaximumFileSize
TypeScript
get volumeMaximumFileSize(): (number) | null
Swift declaration
var volumeMaximumFileSize: Int? { get }
The largest file size (in bytes) supported by this file system, or nil if this cannot be determined.
get · iOS 8.0+
fileResourceIdentifier
TypeScript
get fileResourceIdentifier(): ((SDKHandle) & (SDKHandle) & (SDKHandle)) | null
Swift declaration
var fileResourceIdentifier: (any NSCopying & NSSecureCoding & NSObjectProtocol)? { get }
An identifier which can be used to compare two file system objects for equality using `isEqual`.
Two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system. This identifier is not persistent across system restarts.
get · iOS 8.0+
totalFileAllocatedSize
TypeScript
get totalFileAllocatedSize(): (number) | null
Swift declaration
var totalFileAllocatedSize: Int? { get }
Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by `totalFileSize` if the resource is compressed.
- note: Only applicable to regular files.
get · iOS 11.0+
ubiquitousItemIsShared
TypeScript
get ubiquitousItemIsShared(): (boolean) | null
Swift declaration
var ubiquitousItemIsShared: Bool? { get }
True if ubiquitous item is shared.
get · iOS 10.0+
volumeIsRootFileSystem
TypeScript
get volumeIsRootFileSystem(): (boolean) | null
Swift declaration
var volumeIsRootFileSystem: Bool? { get }
True if the volume is the root filesystem.
get · iOS 8.0+
volumeSupportsRenaming
TypeScript
get volumeSupportsRenaming(): (boolean) | null
Swift declaration
var volumeSupportsRenaming: Bool? { get }
True if the volume can be renamed.
get · iOS 8.0+
volumeSupportsZeroRuns
TypeScript
get volumeSupportsZeroRuns(): (boolean) | null
Swift declaration
var volumeSupportsZeroRuns: Bool? { get }
For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. True if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media.
get · iOS 8.0+
volumeURLForRemounting
TypeScript
get volumeURLForRemounting(): (string) | null
Swift declaration
var volumeURLForRemounting: URL? { get }
The `URL` needed to remount a network volume, or nil if not available.
get · iOS 8.0+
contentModificationDate
TypeScript
get contentModificationDate(): (globalThis.Date) | null
Swift declaration
var contentModificationDate: Date? { get set }
The time the resource content was last modified.
set · iOS 8.0+
contentModificationDate
TypeScript
set contentModificationDate(value: (globalThis.Date) | null)
Swift declaration
var contentModificationDate: Date? { get set }
The time the resource content was last modified.
get · iOS 8.0+
volumeAvailableCapacity
TypeScript
get volumeAvailableCapacity(): (number) | null
Swift declaration
var volumeAvailableCapacity: Int? { get }
Total free space in bytes.
get · iOS 16.4+
volumeMountFromLocation
TypeScript
get volumeMountFromLocation(): (string) | null
Swift declaration
var volumeMountFromLocation: String? { get }
Returns the file system device location.
get · iOS 8.0+
volumeSupportsHardLinks
TypeScript
get volumeSupportsHardLinks(): (boolean) | null
Swift declaration
var volumeSupportsHardLinks: Bool? { get }
True if the volume format supports hard links.
get · iOS 8.0+
localizedTypeDescription
TypeScript
get localizedTypeDescription(): (string) | null
Swift declaration
var localizedTypeDescription: String? { get }
User-visible type or "kind" description.
get · iOS 8.0+
ubiquitousItemIsUploaded
TypeScript
get ubiquitousItemIsUploaded(): (boolean) | null
Swift declaration
var ubiquitousItemIsUploaded: Bool? { get }
True if there is data present in the cloud for this item.
get · iOS 8.0+
volumeSupportsJournaling
TypeScript
get volumeSupportsJournaling(): (boolean) | null
Swift declaration
var volumeSupportsJournaling: Bool? { get }
True if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal.
get · iOS 8.0+
attributeModificationDate
TypeScript
get attributeModificationDate(): (globalThis.Date) | null
Swift declaration
var attributeModificationDate: Date? { get }
The time the resource's attributes were last modified.
get · iOS 14.0+
mayHaveExtendedAttributes
TypeScript
get mayHaveExtendedAttributes(): (boolean) | null
Swift declaration
var mayHaveExtendedAttributes: Bool? { get }
True if the file may have extended attributes. False guarantees there are none.
get · iOS 8.0+
ubiquitousItemIsUploading
TypeScript
get ubiquitousItemIsUploading(): (boolean) | null
Swift declaration
var ubiquitousItemIsUploading: Bool? { get }
True if data is being uploaded for this item.
get · iOS 10.0+
volumeSupportsCompression
TypeScript
get volumeSupportsCompression(): (boolean) | null
Swift declaration
var volumeSupportsCompression: Bool? { get }
True if the volume supports transparent decompression of compressed files using decmpfs.
get · iOS 10.0+
volumeSupportsFileCloning
TypeScript
get volumeSupportsFileCloning(): (boolean) | null
Swift declaration
var volumeSupportsFileCloning: Bool? { get }
True if the volume supports clonefile(2).
get · iOS 8.0+
volumeSupportsSparseFiles
TypeScript
get volumeSupportsSparseFiles(): (boolean) | null
Swift declaration
var volumeSupportsSparseFiles: Bool? { get }
True if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length.
get · iOS 8.0+
volumeSupportsVolumeSizes
TypeScript
get volumeSupportsVolumeSizes(): (boolean) | null
Swift declaration
var volumeSupportsVolumeSizes: Bool? { get }
True if the volume supports returning volume size values (`volumeTotalCapacity` and `volumeAvailableCapacity`).
get · iOS 26.0+
ubiquitousItemIsSyncPaused
TypeScript
get ubiquitousItemIsSyncPaused(): (boolean) | null
Swift declaration
var ubiquitousItemIsSyncPaused: Bool? { get }
True if the sync of the item has been paused.
get · iOS 10.0+
volumeSupportsSwapRenaming
TypeScript
get volumeSupportsSwapRenaming(): (boolean) | null
Swift declaration
var volumeSupportsSwapRenaming: Bool? { get }
True if the volume supports renamex_np(2)'s RENAME_SWAP option.
get · iOS 8.0+
ubiquitousItemIsDownloading
TypeScript
get ubiquitousItemIsDownloading(): (boolean) | null
Swift declaration
var ubiquitousItemIsDownloading: Bool? { get }
True if data is being downloaded for this item.
get · iOS 8.0+
volumeSupportsPersistentIDs
TypeScript
get volumeSupportsPersistentIDs(): (boolean) | null
Swift declaration
var volumeSupportsPersistentIDs: Bool? { get }
True if the volume format supports persistent object identifiers and can look up file system objects by their IDs.
get · iOS 8.0+
volumeSupportsSymbolicLinks
TypeScript
get volumeSupportsSymbolicLinks(): (boolean) | null
Swift declaration
var volumeSupportsSymbolicLinks: Bool? { get }
True if the volume format supports symbolic links.
get · iOS 8.0+
ubiquitousItemUploadingError
TypeScript
get ubiquitousItemUploadingError(): (NSError) | null
Swift declaration
var ubiquitousItemUploadingError: NSError? { get }
Returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h
get · iOS 11.0+
volumeSupportsImmutableFiles
TypeScript
get volumeSupportsImmutableFiles(): (boolean) | null
Swift declaration
var volumeSupportsImmutableFiles: Bool? { get }
True if the volume supports making files immutable with isUserImmutable or isSystemImmutable.
get · iOS 8.0+
ubiquitousItemDownloadingError
TypeScript
get ubiquitousItemDownloadingError(): (NSError) | null
Swift declaration
var ubiquitousItemDownloadingError: NSError? { get }
Returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h
get · iOS 8.0+
volumeSupportsExtendedSecurity
TypeScript
get volumeSupportsExtendedSecurity(): (boolean) | null
Swift declaration
var volumeSupportsExtendedSecurity: Bool? { get }
True if the volume implements extended security (ACLs).
get · iOS 8.0+
ubiquitousItemDownloadRequested
TypeScript
get ubiquitousItemDownloadRequested(): (boolean) | null
Swift declaration
var ubiquitousItemDownloadRequested: Bool? { get }
Returns whether a download of this item has already been requested with an API like `startDownloadingUbiquitousItem(at:) throws`.
get · iOS 8.0+
ubiquitousItemDownloadingStatus
TypeScript
get ubiquitousItemDownloadingStatus(): (URLUbiquitousItemDownloadingStatus) | null
Swift declaration
var ubiquitousItemDownloadingStatus: URLUbiquitousItemDownloadingStatus? { get }
Returns the download status of this item.
get · iOS 11.0+
volumeSupportsAccessPermissions
TypeScript
get volumeSupportsAccessPermissions(): (boolean) | null
Swift declaration
var volumeSupportsAccessPermissions: Bool? { get }
True if the volume supports setting POSIX access permissions with fileSecurity.
get · iOS 10.0+
volumeSupportsExclusiveRenaming
TypeScript
get volumeSupportsExclusiveRenaming(): (boolean) | null
Swift declaration
var volumeSupportsExclusiveRenaming: Bool? { get }
True if the volume supports renamex_np(2)'s RENAME_EXCL option.
get · iOS 14.5+
ubiquitousItemIsExcludedFromSync
TypeScript
get ubiquitousItemIsExcludedFromSync(): (boolean) | null
Swift declaration
var ubiquitousItemIsExcludedFromSync: Bool? { get set }
True if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous.
set · iOS 14.5+
ubiquitousItemIsExcludedFromSync
TypeScript
set ubiquitousItemIsExcludedFromSync(value: (boolean) | null)
Swift declaration
var ubiquitousItemIsExcludedFromSync: Bool? { get set }
True if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous.
get · iOS 8.0+
volumeLocalizedFormatDescription
TypeScript
get volumeLocalizedFormatDescription(): (string) | null
Swift declaration
var volumeLocalizedFormatDescription: String? { get }
The user-visible volume format.
get · iOS 8.0+
volumeSupportsCasePreservedNames
TypeScript
get volumeSupportsCasePreservedNames(): (boolean) | null
Swift declaration
var volumeSupportsCasePreservedNames: Bool? { get }
True if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case).
get · iOS 8.0+
volumeSupportsCaseSensitiveNames
TypeScript
get volumeSupportsCaseSensitiveNames(): (boolean) | null
Swift declaration
var volumeSupportsCaseSensitiveNames: Bool? { get }
True if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters.
get · iOS 8.0+
volumeSupportsRootDirectoryDates
TypeScript
get volumeSupportsRootDirectoryDates(): (boolean) | null
Swift declaration
var volumeSupportsRootDirectoryDates: Bool? { get }
True if the volume supports reliable storage of times for the root directory.
get · iOS 8.0+
volumeSupportsAdvisoryFileLocking
TypeScript
get volumeSupportsAdvisoryFileLocking(): (boolean) | null
Swift declaration
var volumeSupportsAdvisoryFileLocking: Bool? { get }
True if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call.
get · iOS 8.0+
ubiquitousItemContainerDisplayName
TypeScript
get ubiquitousItemContainerDisplayName(): (string) | null
Swift declaration
var ubiquitousItemContainerDisplayName: String? { get }
Returns the name of this item's container as displayed to users.
get · iOS 26.0+
ubiquitousItemSupportedSyncControls
TypeScript
get ubiquitousItemSupportedSyncControls(): (NSFileManagerSupportedSyncControls) | null
Swift declaration
var ubiquitousItemSupportedSyncControls: NSFileManagerSupportedSyncControls? { get }
The supported sync controls on the item.
get · iOS 11.0+
ubiquitousSharedItemCurrentUserRole
TypeScript
get ubiquitousSharedItemCurrentUserRole(): (URLUbiquitousSharedItemRole) | null
Swift declaration
var ubiquitousSharedItemCurrentUserRole: URLUbiquitousSharedItemRole? { get }
The current user's role for this shared item, or nil if not shared.
get · iOS 8.0+
ubiquitousItemHasUnresolvedConflicts
TypeScript
get ubiquitousItemHasUnresolvedConflicts(): (boolean) | null
Swift declaration
var ubiquitousItemHasUnresolvedConflicts: Bool? { get }
True if this item has conflicts outstanding.
get · iOS 11.0+
ubiquitousSharedItemOwnerNameComponents
TypeScript
get ubiquitousSharedItemOwnerNameComponents(): (PersonNameComponents) | null
Swift declaration
var ubiquitousSharedItemOwnerNameComponents: PersonNameComponents? { get }
The name components for the owner, or nil if not shared.
get · iOS 11.0+
volumeAvailableCapacityForImportantUsage
TypeScript
get volumeAvailableCapacityForImportantUsage(): (number) | null
Swift declaration
var volumeAvailableCapacityForImportantUsage: Int64? { get }
Total available capacity in bytes for "Important" resources, including space expected to be cleared by purging non-essential and cached resources.
"Important" means something that the user or application clearly expects to be present on the local system, but is ultimately replaceable. This would include items that the user has explicitly requested via the UI, and resources that an application requires in order to provide functionality.
Examples: A video that the user has explicitly requested to watch but has not yet finished watching or an audio file that the user has requested to download.
This value should not be used in determining if there is room for an irreplaceable resource. In the case of irreplaceable resources, always attempt to save the resource regardless of available capacity and handle failure as gracefully as possible.
get · iOS 11.0+
ubiquitousSharedItemCurrentUserPermissions
TypeScript
get ubiquitousSharedItemCurrentUserPermissions(): (URLUbiquitousSharedItemPermissions) | null
Swift declaration
var ubiquitousSharedItemCurrentUserPermissions: URLUbiquitousSharedItemPermissions? { get }
The permissions for the current user, or nil if not shared.
get · iOS 11.0+
volumeAvailableCapacityForOpportunisticUsage
TypeScript
get volumeAvailableCapacityForOpportunisticUsage(): (number) | null
Swift declaration
var volumeAvailableCapacityForOpportunisticUsage: Int64? { get }
Total available capacity in bytes for "Opportunistic" resources, including space expected to be cleared by purging non-essential and cached resources.
"Opportunistic" means something that the user is likely to want but does not expect to be present on the local system, but is ultimately non-essential and replaceable. This would include items that will be created or downloaded without an explicit request from the user on the current device.
Examples: A background download of a newly available episode of a TV series that a user has been recently watching, a piece of content explicitly requested on another device, and a new document saved to a network server by the current user from another device.
get ubiquitousSharedItemMostRecentEditorNameComponents(): (PersonNameComponents) | null
Swift declaration
var ubiquitousSharedItemMostRecentEditorNameComponents: PersonNameComponents? { get }
The name components for the most recent editor, or nil if not shared.
get · iOS 8.0+
volume
TypeScript
get volume(): (string) | null
Swift declaration
var volume: URL? { get }
URL of the volume on which the resource is stored.
get · iOS 8.0+
fileSize
TypeScript
get fileSize(): (number) | null
Swift declaration
var fileSize: Int? { get }
Total file size in bytes
- note: Only applicable to regular files.
get · iOS 8.0+
isHidden
TypeScript
get isHidden(): (boolean) | null
Swift declaration
var isHidden: Bool? { get set }
True for resources normally not displayed to users.
- note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property.
set · iOS 8.0+
isHidden
TypeScript
set isHidden(value: (boolean) | null)
Swift declaration
var isHidden: Bool? { get set }
True for resources normally not displayed to users.
- note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property.
get · iOS 14.0+
isSparse
TypeScript
get isSparse(): (boolean) | null
Swift declaration
var isSparse: Bool? { get }
True if the file has sparse regions.
get · iOS 8.0+
isVolume
TypeScript
get isVolume(): (boolean) | null
Swift declaration
var isVolume: Bool? { get }
True for the root directory of a volume.
get · iOS 8.0+
isPackage
TypeScript
get isPackage(): (boolean) | null
Swift declaration
var isPackage: Bool? { get set }
True for packaged directories.
- note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect.
set · iOS 8.0+
isPackage
TypeScript
set isPackage(value: (boolean) | null)
Swift declaration
var isPackage: Bool? { get set }
True for packaged directories.
- note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect.