*open-rename-function*

Variable

Package: excl

Bound to a function taking a pathname as an argument and returning a new pathname. Normally the new pathname will differ only in the filename and type slots, with both being some reasonable modification of the original filename and type. This function is run when the value of the if-exists keyword argument to open is :rename or :rename-and-delete (and the direction argument is :io or :output, so the if-exists argument is not ignored).

The function that is the initial value of this variable prepends the value of *open-rename-prefix* to the file name and appends the value of *open-rename-suffix* as the new file type (the old type, if present, becomes part of the file name). Thus, using the initial values for the three variables, a file named foo.bar will be renamed foo.bar.bak: the file name is foo.bar and the type is bak. A file named foo will be renamed foo.bak.

Note this behavior is changed from Allegro CL 4.3 on Unix platforms. In the older versions, -old was appended to the type. The change allows better integration with Windows.

See Extensions to cl:make-package, cl:disassemble, cl:openimplementation.htm for information on the implementation of open.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.