Filesystem-related utilities. Only work on sys targets and/or nodejs depending on the methods

Static methods

statichaveSameContent(filePath1:String, filePath2:String):Bool

statichaveSameLastModified(filePath1:String, filePath2:String):Bool

staticsetToSameLastModified(srcFilePath:String, dstFilePath:String):Void

Only works in nodejs for now.

@:value({ recursive : true, subCall : false, excludeSystemFiles : true })staticgetFlatDirectory(dir:String, excludeSystemFiles:Bool = true, subCall:Bool = false, recursive:Bool = true):Array<String>

staticgetLastModified(path:String):Float

Get file last modified time (in seconds) or -1 if not available

Parameters:

path

Returns:

Float

@:value({ excludeSystemFiles : true })staticremoveEmptyDirectories(dir:String, excludeSystemFiles:Bool = true):Void

@:value({ excludeSystemFiles : true })staticisEmptyDirectory(dir:String, excludeSystemFiles:Bool = true):Bool

staticdeleteRecursive(toDelete:String):Void

staticgetRelativePath(absolutePath:String, relativeTo:String):String

@:value({ removeExisting : false })staticcopyDirectory(srcDir:String, dstDir:String, removeExisting:Bool = false):Void

staticdeleteFile(path:String):Void

staticgetBytes(path:String):Null<Bytes>

staticsaveContent(path:String, content:String):Void

staticsaveBytes(path:String, bytes:Bytes):Void

staticexists(path:String):Bool

staticisDirectory(path:String):Bool