View/Edit #1:filecopy

Switch to edit mode.

Name(s): filecopy
1:  {oldname, dest, ?newname = oldname} = args
2:  oldname = $file_utils:trans_to(oldname)
3:  newname = $file_utils:trans_to($string_utils:lowercase(newname))
4:  if (!this:fileexists(oldname))
5:    raise(E_INVIND, "File not found")
6:  elseif (!$perm_utils:controls(caller_perms(), dest))
7:    raise(E_PERM)
8:  elseif (this:fileaccess(oldname) == "" && !caller_perms():controls(this))
9:    raise(E_PERM)
10: else
11:   call_function("filerun", "filecopy", {}, {}, this:basedir()[2..$] + "/", oldname, dest:basedir()[2..$] + "/", newname)
12: endif
13: "Last modified by Slacker (#55) on Mon Jun 21 05:46:05 1999 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

[home | help | who | search | setup | code]