FileManager
extension FileManager
-
Saves image to images directory
Declaration
Swift
func saveImage(_ data: Data, filename: String) -> URL?Parameters
dataData that will be saved
filenameFilename
-
Data that represent image
Declaration
Swift
func imageData(filename: String) -> Data?Parameters
filenameFilename
-
Saves data
Declaration
Swift
func save(_ data: Data, filename: String, toDirectory directory: URL) -> URL?Parameters
dataData object
filenameFilename
directoryDirectory where data will be saved
-
Retrieves data
Declaration
Swift
func data(fromDirectory directory: URL, filename: String) -> Data?Parameters
directoryDirectory where located a data
filenameFilename
-
Removes images directory
Declaration
Swift
func removeImagesDirectory()
FileManager Extension Reference