FileManager
extension FileManager
-
Undocumented
Declaration
Swift
public var groupIdentifier: String { get }
-
Obtain the URL for a new, temporary file. The file will exist on the system but will be empty.
Throws
exceptions encountered by FileManager while locating location for temporary fileDeclaration
Swift
public func newTemporaryFile() throws -> URL
Return Value
the location of the temporary file.
-
Location of app documents that we want to keep private but backed-up. We need to create it if it does not exist, so this could be a high latency call.
Declaration
Swift
public var privateDocumentsDirectory: URL { get }
-
Location of shared documents between app and extension
Declaration
Swift
public var sharedDocumentsDirectory: URL { get }
-
Undocumented
Declaration
Swift
public func sharedPath(for component: String) -> URL
-
Undocumented
Declaration
Swift
public var sharedFileNames: [String] { get }
-
True if the user has an iCloud container available to use
Declaration
Swift
public var hasCloudDirectory: Bool { get }
-
Location of documents on device that can be backed-up to iCloud if enabled.
Declaration
Swift
public var localDocumentsDirectory: URL { get }
-
Location of app documents in iCloud (if enabled). NOTE: this should not be accessed from the main thread as it can take some time before it will return a value.
Declaration
Swift
public var cloudDocumentsDirectory: URL? { get }
-
Try to obtain the size of a given file.
Declaration
Swift
public func fileSizeOf(url: URL) -> UInt64
Parameters
url
the location of the file to measure
Return Value
size in bytes or 0 if there was a problem getting the size