diff options
| author | ruki <[email protected]> | 2020-03-24 00:48:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-23 22:53:01 +0800 |
| commit | 9243d46338684ca5bceafe91ab5e45db3dc4fabf (patch) | |
| tree | 5454e8546da33d2d6804b297e412350fdddfd6df /xmake/core/sandbox/modules/os.lua | |
| parent | 44f3296096c3c18fa2825207445341410bddb428 (diff) | |
improve os.cp
Diffstat (limited to 'xmake/core/sandbox/modules/os.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/os.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/sandbox/modules/os.lua b/xmake/core/sandbox/modules/os.lua index 0436eced3..e0acaaeba 100644 --- a/xmake/core/sandbox/modules/os.lua +++ b/xmake/core/sandbox/modules/os.lua @@ -76,9 +76,9 @@ sandbox_os.SYSERR_NOT_PERM = os.SYSERR_NOT_PERM sandbox_os.SYSERR_NOT_FILEDIR = os.SYSERR_NOT_FILEDIR -- copy file or directory -function sandbox_os.cp(srcpath, dstpath) +function sandbox_os.cp(srcpath, dstpath, opt) assert(srcpath and dstpath) - local ok, errors = os.cp(vformat(srcpath), vformat(dstpath)) + local ok, errors = os.cp(vformat(srcpath), vformat(dstpath), opt) if not ok then os.raise(errors) end @@ -112,12 +112,12 @@ function sandbox_os.ln(srcpath, dstpath) end -- copy file or directory with the verbose info -function sandbox_os.vcp(srcpath, dstpath) +function sandbox_os.vcp(srcpath, dstpath, opt) assert(srcpath and dstpath) if option.get("verbose") then utils.cprint("${dim}> copy %s to %s ..", srcpath, dstpath) end - return sandbox_os.cp(srcpath, dstpath) + return sandbox_os.cp(srcpath, dstpath, opt) end -- move file or directory with the verbose info |
