diff options
| author | ruki <[email protected]> | 2022-07-23 00:38:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-23 00:38:12 +0800 |
| commit | 8cb0768ed29c7ea78cd27fdd3febc66c2d2ddce9 (patch) | |
| tree | 9ca7aa0543a54285fb2ca17ef1560b1c04ca3699 /xmake/core/base | |
| parent | fba309ca9f8e3fc8ff2c90f821b6ee501096fdbd (diff) | |
improve fwatcher api
Diffstat (limited to 'xmake/core/base')
| -rw-r--r-- | xmake/core/base/fwatcher.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/base/fwatcher.lua b/xmake/core/base/fwatcher.lua index da6d4c2a5..00ee35718 100644 --- a/xmake/core/base/fwatcher.lua +++ b/xmake/core/base/fwatcher.lua @@ -29,6 +29,8 @@ local scheduler = require("base/scheduler") -- save original interfaces fwatcher._open = fwatcher._open or fwatcher.open +fwatcher._add = fwatcher._add or fwatcher.add +fwatcher._remove = fwatcher._remove or fwatcher.remove fwatcher._wait = fwatcher._wait or fwatcher.wait fwatcher._close = fwatcher._close or fwatcher.close @@ -47,6 +49,14 @@ function _instance:otype() return 4 end +-- add watch directory, e.g. {recursion = true} +function _instance:add(watchdir, opt) +end + +-- remove watch directory +function _instance:remove(watchdir) +end + -- wait event -- -- @param timeout the timeout |
