FileManager

public extension FileManager
  • Undocumented

    Declaration

    Swift

    var documentsDirectory: URL { get }
  • Undocumented

    Declaration

    Swift

    var cachesDirectory: URL { get }
  • Creates directory in NSTemporary directory

    Throws

    createDirectory

    Declaration

    Swift

    class func createTemporaryDirectory(folderName: String? = nil) throws -> URL

    Parameters

    folderName

    if present, creates subdirectory with given name e.g. tmp/uuid/folderName

    Return Value

    url of new directory

  • Undocumented

    Declaration

    Swift

    class func sizeOfFile(atPath path: String) -> Int64?
  • Undocumented

    Declaration

    Swift

    class func sizeOfFile(atURL url: URL) -> Int64?
  • Undocumented

    Declaration

    Swift

    class func modificationDateOfFile(atPath path: String) -> Date?
  • Undocumented

    Declaration

    Swift

    class func modificationDateOfFile(atURL url: URL) -> Date?
  • Undocumented

    Declaration

    Swift

    class func fileIsDirectory(atPath path: String) -> Bool
  • Undocumented

    Declaration

    Swift

    class func fileIsDirectory(atURL url: URL) -> Bool
  • Undocumented

    Declaration

    Swift

    class func save(data: Data, fullFilename: String, createDirectory: Bool = true, allowEmpty: Bool = false) -> Bool
  • Undocumented

    Declaration

    Swift

    class func uniquePath(fromBase basePath: String) -> String
  • Undocumented

    Declaration

    Swift

    class func uniqueFileURL(fromBase base: URL) -> URL