The resource’s parent directory, if any.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Framework
- Foundation
Declaration
var parentDirectory: URL? { get }
The resource’s parent directory, if any.
SDKs
Framework
var parentDirectory: URL? { get }
var added To Directory Date: Date?
The date the resource was created, or renamed into or within its parent directory.
var all Values: [URLResource Key : Any]
A loosely-typed dictionary containing all keys and values.
var attribute Modification Date: Date?
The time the resource’s attributes were last modified.
var canonical Path: String?
The URL’s path as a canonical absolute file system path.
var content Access Date: Date?
The date the resource was last accessed.
var content Modification Date: Date?
The time the resource content was last modified.
var creation Date: Date?
The date the resource was created.
var generation Identifier: (NSCopying & NSSecure Coding & NSObject Protocol)?
An opaque generation identifier which can be compared using ==
to determine if the data in a document has been modified.
var has Hidden Extension: Bool?
True for resources whose filename extension is removed from the localized name property.
var is Alias File: Bool?
true if the resource is a Finder alias file or a symlink, false otherwise
var is Excluded From Backup: Bool?
True if resource should be excluded from backups, false otherwise.
var is Hidden: Bool?
True for resources normally not displayed to users.
var is Package: Bool?
True for packaged directories.
var is Readable: Bool?
True if this process (as determined by EUID) can read the resource.
var is Symbolic Link: Bool?
True for symlinks.
var is System Immutable: Bool?
True for system-immutable resources.
var is User Immutable: Bool?
True for user-immutable resources
var is Writable: Bool?
True if this process (as determined by EUID) can write to the resource.
var label Number: Int?
The label number assigned to the resource.
var link Count: Int?
Number of hard links to the resource.
var localized Label: String?
The user-visible label text.
var localized Name: String?
Localized or extension-hidden name as displayed to users.
var localized Type Description: String?
User-visible type or “kind” description.
var name: String?
The resource name provided by the file system.
var path: String?
The URL’s path as a file system path.
var preferred IOBlock Size: Int?
The optimal block size when reading or writing this file’s data, or nil if not available.
var quarantine Properties: [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 tag Names: [String]?
The array of Tag names.
var type Identifier: String?
Uniform type identifier (UTI) for the resource.