summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-03-03 17:16:49 +0800
committerruki <[email protected]>2016-03-03 17:16:49 +0800
commitc617361644a1856ffda5b0201b50f933d1f2f6cb (patch)
tree4a00fa915dd959fd13e8f2614f61f872d1c7f455 /xmake/core/sandbox/modules/os.lua
parentb331a6e94a0ed82938a626b8aa82d3c8eb6a5199 (diff)
add storage
Diffstat (limited to 'xmake/core/sandbox/modules/os.lua')
-rw-r--r--xmake/core/sandbox/modules/os.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua
index 857ab0cf8..c4903b2c0 100644
--- a/xmake/core/sandbox/modules/os.lua
+++ b/xmake/core/sandbox/modules/os.lua
@@ -144,6 +144,17 @@ function sandbox_os.curdir()
return curdir
end
+-- get the temporary directory
+function sandbox_os.tmpdir()
+
+ -- get it
+ local tmpdir = os.tmpdir()
+ assert(tmpdir)
+
+ -- ok
+ return tmpdir
+end
+
-- run shell
function sandbox_os.run(cmd, ...)