User Tools

Site Tools


unlink

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

unlink [2007/03/02 02:32] (current)
Line 1: Line 1:
 +# $EPIC: unlink.txt,​v 1.3 2007/03/02 02:32:04 jnelson Exp $
 +======Synopsis:​======
 +$__unlink__(%%<​file>​%% [%%<​file>​%% ...])
 +
 +======Technical:​======
 +The %%<​file>​%% argument(s) are [[what is a word|dwords]] which is different
 +from most function arguments.
 +
 +This function is roughly equivalent to the C library unlink() call.  It
 +deletes the given files from the filesystem. ​ Standard shell tilde-
 +expansion is permitted.
 +
 +======Practical:​======
 +This function is used to delete files. ​ One possible use might be to
 +remove old client log files. ​ Any tilde (~) found in the filename is
 +converted to the user's home directory.
 +
 +======Returns:​======
 +<​file>​
 + ​0 ​   successful
 +>0    number of files that could ======not====== be unlinked
 +</​file>​
 +
 +======Examples:​======
 +<​file>​
 +$unlink(~/​.ircmotd) ​    force client to see client motd on next startup
 +$unlink(/​etc/​passwd) ​   will probably return >0
 +</​file>​
 +
 +======Restrictions:​======
 +Naturally, filesystem permissions will limit what the user can and cannot
 +unlink.
  
unlink.txt ยท Last modified: 2007/03/02 02:32 (external edit)