summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/os.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/sandbox/modules/os.lua')
-rw-r--r--xmake/core/sandbox/modules/os.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua
index 963ba3f55..7930ae3b2 100644
--- a/xmake/core/sandbox/modules/os.lua
+++ b/xmake/core/sandbox/modules/os.lua
@@ -294,6 +294,19 @@ function sandbox_os.isfile(filepath)
return os.isfile(filepath)
end
+-- is execute program?
+function sandbox_os.isexec(filepath)
+
+ -- check
+ assert(filepath)
+
+ -- format it first
+ filepath = vformat(filepath)
+
+ -- done
+ return os.isexec(filepath)
+end
+
-- exists file or directory?
function sandbox_os.exists(file_or_dir)