This function does not have any additional arguments other than the ones described in ANSI [see ANSI]. To list files and directories, it follows the rules for matching pathnames described in Wild pathnames and matching. In short, you have the following practical examples:
Argument | Meaning |
---|---|
"/home/jlr/*.*" | List all files in directory /home/jlr/ Note that it lists only files, not directories! |
"/home/jlr/*" | Same as before, but only files without type. |
"/home/jlr/*/" | List all directories contained in /home/jlr/ . Nested directories are not navigated. |
"/home/jlr/**/*.*" | List all files in all directories contained in /home/jlr/ , recursively. Nested directories are navigated. |
In addition to the arguments described in ANSI [see ANSI], the rename-file
function in ECL has an :if-exists
keyword argument that specifies what happens when a file with the new name already exists. Valid values of this argument are:
Argument | Behaviour of the rename-file function |
---|---|
:error | Signal an error |
:supersede , t | Overwrite the existing file |
nil | Don’t overwrite the existing file, don’t signal an error |
Common Lisp and C equivalence
Lisp symbol | C function |
---|---|
delete-file | cl_object cl_delete_file(cl_object filespec) |
directory | cl_object cl_directory(cl_narg narg, cl_object pathspec, ...) |
ensure-directories-exist | cl_object cl_ensure_directories_exist(cl_narg narg, cl_object pathspec, ...) |
file-author | cl_object cl_file_author(cl_object pathspec) |
file-error-pathname | [Only in Common Lisp] |
file-write-date | cl_object cl_file_write_date(cl_object pathspec) |
probe-file | cl_object cl_probe_file(cl_object pathspec) |
rename-file | cl_object cl_rename_file(cl_narg narg, cl_object filespec, cl_object new_name, ...) |
truename | cl_object cl_truename(cl_object filespec) |