Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Rename-a-file/Lang/rename-a-file.lang
Normal file
18
Task/Rename-a-file/Lang/rename-a-file.lang
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Load the IO module
|
||||
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">"
|
||||
ln.loadModule(<pathToIO.lm>)
|
||||
|
||||
fp.rename = ($from, $to) -> {
|
||||
$fileFrom = [[io]]::fp.openFile($from)
|
||||
$fileTo = [[io]]::fp.openFile($to)
|
||||
|
||||
[[io]]::fp.rename($fileFrom, $fileTo)
|
||||
|
||||
[[io]]::fp.closeFile($fileFrom)
|
||||
[[io]]::fp.closeFile($fileTo)
|
||||
}
|
||||
|
||||
fp.rename(input.txt, output.txt)
|
||||
fp.rename(/input.txt, /output.txt)
|
||||
fp.rename(docs, mydocs)
|
||||
fp.rename(/docs, /mydocs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue