std-file-rename


Synopsis

(std-file-rename <old-fname> <new-fname>)

Description

std-file-rename renames the filename on the filesystem. to-fname must not exist! On sucess it return T, else nil which may indicate that:

1) new-fname already exists,

2) old-fame is a directory (should this be allowed?),

3) you don't have enough privileges,

4) old-fname is the same as new-fame

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

Example

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

Arguments

old-fname,new-fname: Filenames. Partial or fully qualified filename specifiers without wildcards.

Return Value

T on success or nil.

Side Effects

On success it renames a file with a system call.

Operating system exceptions might occur.

Module

(std-require 'STDFILE)

Defined in STDFILE