Add a few useful os calls to nimscript (#7442)
This commit is contained in:
parent
16c1a90857
commit
f6c8f97fe8
4 changed files with 81 additions and 2 deletions
|
|
@ -70,11 +70,17 @@ proc setupVM*(module: PSym; cache: IdentCache; scriptName: string;
|
|||
setResult(a, os.getCurrentDir())
|
||||
cbos moveFile:
|
||||
os.moveFile(getString(a, 0), getString(a, 1))
|
||||
cbos moveDir:
|
||||
os.moveDir(getString(a, 0), getString(a, 1))
|
||||
cbos copyFile:
|
||||
os.copyFile(getString(a, 0), getString(a, 1))
|
||||
cbos copyDir:
|
||||
os.copyDir(getString(a, 0), getString(a, 1))
|
||||
cbos getLastModificationTime:
|
||||
# depends on Time's implementation!
|
||||
setResult(a, int64(getLastModificationTime(getString(a, 0))))
|
||||
cbos findExe:
|
||||
setResult(a, os.findExe(getString(a, 0)))
|
||||
|
||||
cbos rawExec:
|
||||
setResult(a, osproc.execCmd getString(a, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue