diff options
| author | ruki <[email protected]> | 2026-03-26 22:46:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-26 22:46:59 +0800 |
| commit | 4dce664638308306dcd637d0a86808589fb617f6 (patch) | |
| tree | dbbea8c7799c1d1a3cdfe69baee49a645b8f40e7 /xmake/core/base/fwatcher.lua | |
| parent | 193e9a96c00a94bc26b1bcd0d15128ffd414662d (diff) | |
update more comments
Diffstat (limited to 'xmake/core/base/fwatcher.lua')
| -rw-r--r-- | xmake/core/base/fwatcher.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/xmake/core/base/fwatcher.lua b/xmake/core/base/fwatcher.lua index 3844f5877..9fc04722e 100644 --- a/xmake/core/base/fwatcher.lua +++ b/xmake/core/base/fwatcher.lua @@ -153,17 +153,30 @@ function _instance:_ensure_opened() return true end --- add watchdir +-- add a directory to watch +-- +-- @param watchdir the directory path to watch +-- @param opt the options, e.g. {recursion = true} +-- @return true on success, or false and error info +-- function fwatcher.add(watchdir, opt) return _instance:add(watchdir, opt) end --- remove watchdir +-- remove a directory from watch +-- +-- @param watchdir the directory path to remove +-- @return true on success, or false and error info +-- function fwatcher.remove(watchdir) return _instance:remove(watchdir) end --- wait event +-- wait for file system event +-- +-- @param timeout the timeout in milliseconds, -1 for infinite +-- @return the event, or nil on timeout +-- function fwatcher.wait(timeout) return _instance:wait(timeout) end |
