Class
FileManager
class FileManager
Topics
Structures
struct DirectoryEnumerationOptionsstruct ItemReplacementOptionsstruct SearchPathDomainMaskstruct UnmountOptions
Initializers
Instance Properties
var currentDirectoryPath: Stringvar delegate: (any FileManagerDelegate)?var homeDirectoryForCurrentUser: URLvar temporaryDirectory: URL
Instance Methods
func attributesOfFileSystem(forPath: String) throws -> [FileAttributeKey : Any]func attributesOfItem(atPath: String) throws -> [FileAttributeKey : Any]func changeCurrentDirectoryPath(String) -> Boolfunc contents(atPath: String) -> Data?func contentsEqual(atPath: String, andPath: String) -> Boolfunc contentsOfDirectory(atPath: String) throws -> [String]func copyItem(at: URL, to: URL) throwsfunc copyItem(atPath: String, toPath: String) throwsfunc createDirectory(at: URL, withIntermediateDirectories: Bool, attributes: [FileAttributeKey : Any]?) throwsfunc createDirectory(atPath: String, withIntermediateDirectories: Bool, attributes: [FileAttributeKey : Any]?) throwsfunc createFile(atPath: String, contents: Data?, attributes: [FileAttributeKey : Any]?) -> Boolfunc createSymbolicLink(at: URL, withDestinationURL: URL) throwsfunc createSymbolicLink(atPath: String, withDestinationPath: String) throwsfunc destinationOfSymbolicLink(atPath: String) throws -> Stringfunc fileExists(atPath: String) -> Boolfunc fileExists(atPath: String, isDirectory: inout Bool) -> Boolfunc homeDirectory(forUser: String) -> URL?func isDeletableFile(atPath: String) -> Boolfunc isExecutableFile(atPath: String) -> Boolfunc isReadableFile(atPath: String) -> Boolfunc isWritableFile(atPath: String) -> Boolfunc linkItem(at: URL, to: URL) throwsfunc linkItem(atPath: String, toPath: String) throwsfunc moveItem(at: URL, to: URL) throwsfunc moveItem(atPath: String, toPath: String) throwsfunc removeItem(at: URL) throwsfunc removeItem(atPath: String) throwsfunc setAttributes([FileAttributeKey : Any], ofItemAtPath: String) throwsfunc string(withFileSystemRepresentation: UnsafePointer<CChar>, length: Int) -> Stringfunc subpathsOfDirectory(atPath: String) throws -> [String]func url(for: FileManager.SearchPathDirectory, in: FileManager.SearchPathDomainMask, appropriateFor: URL?, create: Bool) throws -> URLfunc urls(for: FileManager.SearchPathDirectory, in: FileManager.SearchPathDomainMask) -> [URL]func withFileSystemRepresentation<R>(for: String, (UnsafePointer<CChar>?) throws -> R) rethrows -> R
Type Properties
Enumerations
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype