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