Represents an entry, which is a file or a directory in an nb.fs.NFileSystem
.
0.1.0
.Variables
Methods
iterator():ArrayIterator_hxd_fs_FileEntry
Returns an iterator of all the entries in this entry's associated directory.
load(?onReady:() ‑> Void):Void
Loads a file into memory. The file is loaded asynchronously if the target is javascript or supports threads.
The associated data file will be loaded if it wasn't already loaded.
Throws an error if the entry is not a file.
Parameters:
onReady | Called when the file finishes loading. |
---|
readBytes(out:Bytes, outPos:Int, pos:Int, len:Int):Int
Copies the entry's bytes and stores it into a given haxe.io.Bytes
.
If the entry is a directory, nothing is copied.
Parameters:
out | An |
---|---|
outPos | The position in |
pos | The position in this instance's |
len | Number of bytes to be copied. |
Returns:
len
, or 0 if the entry is a directory.
watch(onChanged:Null<() ‑> Void>):Void
Sets a callback for whenever the file changes.
It must also be added to the associated NFileSystem
's watchedFiles
to trigger,
which by default is done automatically when the file is loaded into memory.