View/Edit #1:filerename file_rename

Switch to edit mode.

Name(s): filerename file_rename
1:  {file, dest} = args
2:  if (!this:fileexists(file))
3:    raise(E_INVIND, "File not found")
4:  elseif (this:fileexists(dest))
5:    raise(E_INVARG, "File already exists with that name")
6:  elseif (!caller_perms():controls(this))
7:    raise(E_PERM)
8:  elseif (dest in this.files_unwritable_by_owner && !caller_perms().wizard)
9:    raise(E_PERM)
10: else
11:   file_rename($file_utils:filespec(this, file), $file_utils:filespec(this, dest))
12: endif
13: "Last modified by Dax (#789) on Sat Sep 18 04:41:28 1999 MDT."
14: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:04 2002 MDT)."
15: "Last modified by Cecil (#7407) on Fri Mar 21 07:31:00 2003 MST."

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

You are not logged in.

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