FileManager
class FileManager : NSObject
-
Mechanica
Cleans all contents in a directory
path
.Throws
throws an error in cases of failure.Declaration
Swift
public final func cleanDirectory(atPath path: String) throws
Parameters
path
directory path (if it’s not a directory path, nothing is done).
-
Mechanica
Delete a file or a directory at a given
path
.Throws
throws an error in cases of failure.Declaration
Swift
public final func deleteFileOrDirectory(atPath path: String) throws
Parameters
path
directory or file path.