PathHelper
open class PathHelper : FileManager
PathHelper is used to perform path related action.
Version
1.5.0Date
29/03/2019-
Whether the file or a directory exists or not.
Declaration
Swift
public var isExisted: Bool { get } -
The path of the file.
Declaration
Swift
public private(set) var path: String { get } -
Initialize the helper.
Declaration
Swift
public init(path: String)Parameters
pathThe path that the helper should hold.
-
Copy current path to a destination.
- Return: Whether the file has been copyed or not.
Declaration
Swift
@discardableResult public func copyItem(toPath path: String) -> Bool?Parameters
newPathThe destination file path. It should start with “/”
-
Remove the file or directory.
Declaration
Swift
@discardableResult public func removeItem() -> Bool?Return Value
Whether the file or directory has been removed or not. Nil if there is an error.
PathHelper Class Reference