Explorer
public class Explorer
Undocumented
-
Singleton of
ExplorerClassDeclaration
Swift
public static let `default`: Explorer -
Undocumented
Declaration
Swift
public init(with fileManager: FileProvider = DefaultFileProvider()) -
Undocumented
Declaration
Swift
public var currentDirectoryPath: String { get } -
Delete File
Declaration
Swift
@discardableResult public func delete(operation: SingleFileOperation) -> Result<SingleFileOperation, Error>Parameters
operationDelete operation, will delete spesific file at spesific path with
SingleFileOperationReturn Value
Result
Result<SingleFileOperation, Error>of the operation. -
Delete Folder
Declaration
Swift
@discardableResult public func delete(operation: SingleFolderOperation) -> Result<SingleFolderOperation, Error>Parameters
operationDelete operation, will delete spesific folder at spesific path.
Return Value
Result
Result<SingleFileOperation, Error>of the operation. -
Write file
Declaration
Swift
@discardableResult public func write(operation: SingleFileOperation, writingStrategy: WriteStrategy = .safe) -> Result<SingleFileOperation, Error>Parameters
operationWrite Operation, will write spesific to the operation
writingStrategyhow you want the operation to write based on spesific strategy
currentProgressCallbackadd your custom action in the middle of the operation (for example, you want to print the current progress operation)
Return Value
Result of the operation.
-
Write files
Declaration
Swift
@discardableResult public func write(operation: BatchFileOperation, writingStrategy: WriteStrategy = .safe) -> Result<BatchFileOperation, Error>Parameters
operationWrite Operation, will write spesific to the operation
writingStrategyhow you want the operation to write based on spesific strategy
currentProgressCallbackadd your custom action in the middle of the operation (for example, you want to print the current progress operation)
Return Value
Result of the operation.
-
Write Folder, define your folder and files, and
Explorerwill create for you.Declaration
Swift
@discardableResult public func write(operation: SingleFolderOperation, writingStrategy: WriteStrategy = .safe) -> Result<SingleFolderOperation, Error>Parameters
operationWrite Operation, will write spesific to the operation
writingStrategyhow you want the operation to write based on spesific strategy
currentProgressCallbackadd your custom action in the middle of the operation (for example, you want to print the current progress operation)
Return Value
Result of the operation.
-
Write Folder, define your folder and files, and
Explorerwill create for you.Declaration
Swift
@discardableResult public func write(operation: BatchFolderOperation, writingStrategy: WriteStrategy = .safe) -> Result<BatchFolderOperation, Error>Parameters
operationWrite Operation, will write spesific to the operation
writingStrategyhow you want the operation to write based on spesific strategy
currentProgressCallbackadd your custom action in the middle of the operation (for example, you want to print the current progress operation)
Return Value
Result of the operation.
-
Check if current path is exist or not
Declaration
Swift
public func isFileExist(path: String) -> Bool -
Check if current path is file or directory
Declaration
Swift
public func isFile(path: String) -> Result<Bool, Error> -
Scan directory at path, will return the content inside it
Declaration
Swift
public func list(at path: String, withFolder isFolderIncluded: Bool, isRecursive: Bool) -> Result<[Explorable], Error>Parameters
pathPath to scan
withFolderAlso Scan folder or not
isRecursivewill include content inside folder
Return Value
Result of Explorables
Explorer Class Reference