Common File System Resource Keys

Keys that are applicable to file system URLs.

Topics

Constants

kCFURLNameKey

Key for the resource’s name in the file system, returned as a CFString object.

kCFURLLocalizedNameKey

Key for the resource’s localized or extension-hidden name, retuned as a CFString object.

kCFURLPathKey

A CFString value containing the URL’s path as a file system path. (read-only)

kCFURLIsRegularFileKey

Key for determining whether the resource is a regular file, as opposed to a directory or a symbolic link. Returned as a CFBoolean object.

kCFURLIsDirectoryKey

Key for determining whether the resource is a directory, returned as a CFBoolean object.

kCFURLIsSymbolicLinkKey

Key for determining whether the resource is a symbolic link, returned as a CFBoolean object.

kCFURLIsVolumeKey

Key for determining whether the resource is the root directory of a volume, returned as a CFBoolean object.

kCFURLIsPackageKey

Key for determining whether the resource is a packaged directory, returned as a CFBoolean object.

kCFURLIsSystemImmutableKey

Key for determining whether the resource's system immutable bit is set, returned as a CFBoolean object.

kCFURLIsUserImmutableKey

Key for determining whether the resource's user immutable bit is set, returned as a CFBoolean object.

kCFURLIsHiddenKey

Key for determining whether the resource is normally not displayed to users, returned as a CFBoolean object.

kCFURLHasHiddenExtensionKey

Key for determining whether the resource’s extension is normally removed from its localized name, returned as a CFBoolean object.

kCFURLCreationDateKey

Key for the resource’s creation date, returned as a CFDate object if the volume supports creation dates, or nil if creation dates are unsupported.

kCFURLContentAccessDateKey

Key for the last time the resource was accessed, returned as a CFDate object if the volume supports access dates, or nil if access dates are unsupported.

kCFURLContentModificationDateKey

Key for the last time the resource was modified, returned as a CFDate object if the volume supports modification dates, or nil if modification dates are unsupported.

kCFURLAttributeModificationDateKey

Key for the last time the resource’s attributes were modified, returned as a CFDate object if the volume supports attribute modification dates, or nil if attribute modification dates are unsupported.

kCFURLLinkCountKey

Key for the number of hard links to the resource, returned as a CFNumber object.

kCFURLParentDirectoryURLKey

Key for the parent directory of the resource, returned as a CFURL object, or nil if the resource is the root directory of its volume.

kCFURLVolumeURLKey

Key for the root directory of the resource’s volume, returned as a CFURL object.

kCFURLTypeIdentifierKey

Key for the resource’s uniform type identifier (UTI), returned as a CFString object.

kCFURLLocalizedTypeDescriptionKey

Key for the resource’s localized type description, returned as a CFString object.

kCFURLLabelNumberKey

Key for the resource’s label number, returned as a CFNumber object.

kCFURLLabelColorKey

Key for the resource’s label color, returned as a CFColorRef object, or NULL if the resource has no label color.

Deprecated
kCFURLLocalizedLabelKey

Key for the resource’s localized label text, returned as a CFString object, or NULL if the resource has no localized label text.

kCFURLEffectiveIconKey

Key for the resource’s typical icon, returned as a CGImageRef object.

Deprecated
kCFURLCustomIconKey

Key for the icon stored with the resource, returned as a CGImageRef object, or NULL if the resource has no custom icon.

Deprecated
kCFURLFileResourceIdentifierKey

Key for the resource’s unique identifier, returned as a CFType object.

kCFURLVolumeIdentifierKey

Key for the unique identifier of the resource’s volume, returned as a CFType object.

kCFURLPreferredIOBlockSizeKey

Key for the optimal block size to use when reading or writing this file's data, returned as a CFNumber object, or NULL if the preferred size is not available.

kCFURLIsReadableKey

Key for determining whether the current process (as determined by the EUID) can read the resource, returned as a CFBoolean object.

kCFURLIsWritableKey

Key for determining whether the current process (as determined by the EUID) can write to the resource, returned as a CFBoolean object.

kCFURLIsExecutableKey

Key for determining whether the current process (as determined by the EUID) can execute the resource (if it is a file) or search the resource (if it is a directory), returned as a CFBoolean object.

kCFURLFileSecurityKey

Key for the resource’s security information, returned as a CFFileSecurity object.

kCFURLFileResourceTypeKey

Key for the resource’s object type, returned as a CFString object. See File Resource Types for possible values.

See Also

File System Constants

File Property Keys

Keys that apply to properties of files.

iCloud Constants

These constants can be used to determining whether a file is stored in the cloud and to obtain information about its status.

Volume Property Keys

Keys that apply to volumes.

CFError userInfo Dictionary Keys

Keys in the userInfo dictionary of a CFError object when certain CFURL functions return an error.