The following functions are declared in <LEDA/file.h>.
| string | set_directory(string new_dir) | |
| sets the current working directory to new_dir and returns the name of the old cwd. | ||
| string | get_directory() | returns the name of the current working directory. |
| list<string> | get_directories(string dir) | |
| returns the list of names of all sub-directories in directory dir. | ||
| list<string> | get_files(string dir) | returns the list of names of all regular files in directory dir. |
| list<string> | get_files(string dir, string pattern) | |
| returns the list of names of all regular files in directory dir matching pattern. | ||
| list<string> | get_entries(string dir) | returns the list of all entries (directory and files) of directory dir. |
| bool | is_directory(string fname) | |
| returns true if fname is the path name of a directory and false otherwise. | ||
| bool | is_file(string fname) | returns true if fname is the path name of a regular file and false otherwise. |
| bool | is_link(string fname) | returns true if fname is the path name of a symbolic link and false otherwise. |
| string | tmp_file_name() | returns a unique name for a temporary file. |
| bool | delete_file(string fname) | deletes file fname returns true on success and false otherwise. |