std-file-delete


Synopsis

(std-file-delete <fname>)

Description

std-file-delete deletes the file specified by its filename from the filesystem with a system call.

The filename may not contain wildcards, use std-glob-files instead. On sucess it returns T, else nil which may indicate that:

1) fname does not exist,

2) fname is an opened file,

3) fname is a directory,

4) fname is a write-protected or you don't have enough privileges.

It's the same as the Visual Lisp function vl-file-delete, but backwards compatible and should be supported on other platforms too.

Example

(std-file-delete "/acad/test.bak")  => T or nil

Arguments

fname: A filenames. Partial or fully qualified filename specifier without wildcards.

Return Value

T on success or nil.

Side Effects

On success it removes the a file from the filesystem with a system call. It may be recoverable, but not with any stdlib lisp function.

Operating system exceptions might occur.

Module

(std-require 'STDFILE)

Defined in STDFILE