deleteFile
deleteFile(S_name) =>t/nil
Description
Deletes a file. The file name can be specified with either an absolute or relative path; the SKILL path is used in the latter case. If a symbolic link is passed in as the argument, it is the link itself, not the file or directory referenced by the link, that gets removed. A path that is anchored to the current directory, for example, ./, ../, or ../../.., and so on, is not considered as a relative path.
Arguments
Value Returned
|
File does not exist or signals an error if you do not have permission to delete a file. |
Examples
In the following example, the named file exists and is deleted.
deleteFile("~/test/out.1") => t
In the following example, the named file does not exist.
deleteFile("~/test/out.2") => nil
When you do not have write permission for /bin, an error is printed about permission violation in CIW.
deleteFile("/bin/ls")
Related Topics
Return to top