diff options
| author | ruki <[email protected]> | 2016-04-19 10:15:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-19 10:15:50 +0800 |
| commit | 223c87f37fb9e8f3ffe808fae5041a1c4aee95d0 (patch) | |
| tree | 2aad82da78da4444094a83ad5705f5cdeef28cd4 /xmake/core/sandbox/modules | |
| parent | 9495e08a20c2aeda6b54a4b06b17057056c79ec9 (diff) | |
reimpl check tool
Diffstat (limited to 'xmake/core/sandbox/modules')
| -rw-r--r-- | xmake/core/sandbox/modules/io.lua | 4 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/os.lua | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/io.lua b/xmake/core/sandbox/modules/io.lua index b70664722..0fb383862 100644 --- a/xmake/core/sandbox/modules/io.lua +++ b/xmake/core/sandbox/modules/io.lua @@ -136,7 +136,7 @@ function sandbox_io.read(filepath) filepath = vformat(filepath) -- done - local result, errors = io.read(filepath) + local result, errors = io.readall(filepath) if not result then raise(errors) end @@ -155,7 +155,7 @@ function sandbox_io.write(filepath, data) filepath = vformat(filepath) -- done - local ok, errors = io.write(filepath, data) + local ok, errors = io.writall(filepath, data) if not ok then raise(errors) end diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua index 9ab8eb648..fc4f3c195 100644 --- a/xmake/core/sandbox/modules/os.lua +++ b/xmake/core/sandbox/modules/os.lua @@ -159,6 +159,13 @@ function sandbox_os.tmpdir() return tmpdir end +-- get the temporary file +function sandbox_os.tmpfile() + + -- get it + return os.tmpname() +end + -- get the program directory function sandbox_os.programdir() |
