summaryrefslogtreecommitdiff
path: root/xmake/core/base
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-23 00:52:43 +0800
committerruki <[email protected]>2022-07-23 00:52:43 +0800
commitbf3a38003ae5b93010dd0d8b70155bf1b1ee305a (patch)
treef924fe448c67d490acc0af6b180496efb6bb916e /xmake/core/base
parent6de3254bd605d481b07b4f498b58c4896752089b (diff)
impl fwatcher.wait
Diffstat (limited to 'xmake/core/base')
-rw-r--r--xmake/core/base/fwatcher.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/base/fwatcher.lua b/xmake/core/base/fwatcher.lua
index cec65f02e..9de827ae0 100644
--- a/xmake/core/base/fwatcher.lua
+++ b/xmake/core/base/fwatcher.lua
@@ -34,6 +34,11 @@ fwatcher._remove = fwatcher._remove or fwatcher.remove
fwatcher._wait = fwatcher._wait or fwatcher.wait
fwatcher._close = fwatcher._close or fwatcher.close
+-- the fwatcher event type, @see tbox/platform/fwatcher.h
+fwatcher.ET_MODIFY = 1
+fwatcher.ET_CREATE = 2
+fwatcher.ET_DELETE = 4
+
-- get cdata of fwatcher
function _instance:cdata()
local cdata = self._CDATA
@@ -89,7 +94,7 @@ end
--
-- @param timeout the timeout
--
--- @return ok, event
+-- @return ok, event, e.g {type = fwatcher.ET_MODIFY, path = "/tmp"}
--
function _instance:wait(timeout)