Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Rename-a-file/Fantom/rename-a-file.fantom
Normal file
12
Task/Rename-a-file/Fantom/rename-a-file.fantom
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class Rename
|
||||
{
|
||||
public static Void main ()
|
||||
{
|
||||
// rename file/dir in current directory
|
||||
File.rename("input.txt".toUri).rename("output.txt")
|
||||
File.rename("docs/".toUri).rename("mydocs/")
|
||||
// rename file/dir in root directory
|
||||
File.rename("/input.txt".toUri).rename("/output.txt")
|
||||
File.rename("/docs/".toUri).rename("/mydocs/")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue