This class provides methods for asynchronous operations on files and directories. For synchronous operations, see nusys.FileSystem.

All methods here are asynchronous versions of the functions in nusys.FileSystem. Please see them for a description of the arguments and use of each method.

Any synchronous method that returns no value (Void return type) has an extra callback:Callback<NoData> argument.

Any synchronous method that returns a value has an extra callback:Callback<T> argument, where T is the return type of the synchronous method.

Errors are communicated through the callbacks or in some cases thrown immediately.

Static methods

@:value({ mode : FileAccessMode.Ok })staticaccess (path:FilePath, mode:FileAccessMode = FileAccessMode.Ok, callback:Callback<NoData>):Void

Available on cross

@:value({ mode : FileAccessMode.Ok })staticaccess (path:FilePath, mode:FileAccessMode = FileAccessMode.Ok, cb:Callback<NoData>):Void

Available on eval

staticappendFile (path:FilePath, data:Bytes, ?flags:FileOpenFlags, ?mode:FilePermissions, callback:Callback<NoData>):Void

Available on cross

@:value({ followSymLinks : true })staticchmod (path:FilePath, mode:FilePermissions, followSymLinks:Bool = true, callback:Callback<NoData>):Void

Available on cross

@:value({ followSymLinks : true })staticchown (path:FilePath, uid:Int, gid:Int, followSymLinks:Bool = true, callback:Callback<NoData>):Void

Available on cross

staticexists (path:FilePath, callback:Callback<Bool>):Void

Available on cross

staticexists (path:FilePath, cb:Callback<Bool>):Void

Available on eval

staticlink (existingPath:FilePath, newPath:FilePath, callback:Callback<NoData>):Void

Available on cross

staticmkdir (path:FilePath, ?recursive:Bool, ?mode:FilePermissions, callback:Callback<NoData>):Void

Available on cross

staticmkdtemp (prefix:FilePath, callback:Callback<FilePath>):Void

Available on cross

@:value({ binary : true })staticopen (path:FilePath, ?flags:FileOpenFlags, ?mode:FilePermissions, binary:Bool = true, callback:Callback<File>):Void

Available on cross

staticreadFile (path:FilePath, ?flags:FileOpenFlags, callback:Callback<Bytes>):Void

Available on cross

staticreaddir (path:FilePath, callback:Callback<Array<FilePath>>):Void

staticreaddirTypes (path:FilePath, callback:Callback<Array<DirectoryEntry>>):Void

Available on cross

staticreaddirTypes (path:FilePath, callback:Callback<Array<DirectoryEntry>>):Void

Available on eval

staticreadlink (path:FilePath, callback:Callback<FilePath>):Void

Available on cross

staticrealpath (path:FilePath, callback:Callback<FilePath>):Void

Available on cross

staticrename (oldPath:FilePath, newPath:FilePath, callback:Callback<NoData>):Void

Available on cross

staticrmdir (path:FilePath, callback:Callback<NoData>):Void

Available on cross

@:value({ followSymLinks : true })staticstat (path:FilePath, followSymLinks:Bool = true, callback:Callback<FileStat>):Void

Available on cross

staticsymlink (target:FilePath, path:FilePath, ?type:String, callback:Callback<NoData>):Void

Available on cross

statictruncate (path:FilePath, len:Int, callback:Callback<NoData>):Void

Available on cross

staticunlink (path:FilePath, callback:Callback<NoData>):Void

Available on cross

staticutimes (path:FilePath, atime:Date, mtime:Date, callback:Callback<NoData>):Void

Available on cross

staticwriteFile (path:FilePath, data:Bytes, ?flags:FileOpenFlags, ?mode:FilePermissions, callback:Callback<NoData>):Void

Available on cross