forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
36
Kha/Tools/linux_x64/std/eval/luv/FsEvent.hx
Normal file
36
Kha/Tools/linux_x64/std/eval/luv/FsEvent.hx
Normal file
@ -0,0 +1,36 @@
|
||||
package eval.luv;
|
||||
|
||||
enum abstract FsEventType(Int) {
|
||||
var RENAME = 0;
|
||||
var CHANGE = 1;
|
||||
}
|
||||
|
||||
enum abstract FsEventFlag(Int) {
|
||||
var FS_EVENT_WATCH_ENTRY = 0;
|
||||
var FS_EVENT_STAT = 1;
|
||||
var FS_EVENT_RECURSIVE = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
Filesystem events.
|
||||
|
||||
@see https://aantron.github.io/luv/luv/Luv/FS_event
|
||||
**/
|
||||
@:using(eval.luv.Handle)
|
||||
@:coreType abstract FsEvent to Handle {
|
||||
/**
|
||||
Allocates and initializes an FS event handle.
|
||||
**/
|
||||
static public function init(loop:Loop):Result<FsEvent>;
|
||||
|
||||
/**
|
||||
Starts the handle and watches the given path for changes.
|
||||
**/
|
||||
public function start(path:NativeString, ?flags:Array<FsEventFlag>, callback:(result:Result<{file:NativeString,events:Array<FsEventType>}>)->Void):Void;
|
||||
|
||||
/**
|
||||
Stops the handle.
|
||||
**/
|
||||
public function stop():Result<Result.NoData>;
|
||||
|
||||
}
|
Reference in New Issue
Block a user