![]() |
V3FIT
|
Contains cross platform routines for manipulating files on the file system. Defines a functions to move, copy and delete a file that is cross platform. While, system contains a crossplatform way to call a command line commands, the command used will vary by platform. More...
Functions/Subroutines | |
| subroutine | move_file (file_source, file_dest, error) |
| Moves the source file to the destination. More... | |
| subroutine | copy_file (file_source, file_dest, error) |
| Copies the source file to the destination. More... | |
| subroutine | delete_file (file_source, error) |
| Deletes a file. More... | |
| subroutine | create_directory (directory_source, error) |
| Makes a directory. More... | |
| subroutine | delete_directory (directory_source, error) |
| Deletes a directory. More... | |
| logical function | is_absolute_path (path) |
| Queries if the a path is absoulte. More... | |
| character(len=path_length) function | get_path_of_file (file) |
| Returns the directory of a file. More... | |
| character(len=path_length) function | build_path (path, name) |
| Builds a path. More... | |
| subroutine | change_directory (path, error) |
| Change working directory. More... | |
Variables | |
| integer, parameter | path_length = 300 |
| Length of file paths. | |
Contains cross platform routines for manipulating files on the file system. Defines a functions to move, copy and delete a file that is cross platform. While, system contains a crossplatform way to call a command line commands, the command used will vary by platform.
| character (len=path_length) function file_opts::build_path | ( | character (len=*), intent(in) | path, |
| character (len=*), intent(in) | name | ||
| ) |
Builds a path.
Builds a path by concatenating a string onto a path.
| [in] | path | Existing path. |
| [in] | name | String to add to path. |
Definition at line 382 of file file_opts.f.
| subroutine file_opts::change_directory | ( | character (len=*), intent(in) | path, |
| integer, intent(out) | error | ||
| ) |
Change working directory.
Changes the current working directory of the running process. CHDIR is an extension on many compilers. Check for compatability.
| [in] | path | Path of the working directory to change to. |
| [out] | error | Returned error code. |
Definition at line 414 of file file_opts.f.
| subroutine file_opts::copy_file | ( | character (len=*), intent(in) | file_source, |
| character (len=*), intent(in) | file_dest, | ||
| integer, intent(out) | error | ||
| ) |
Copies the source file to the destination.
Copies a file by calling the appropriate command for the platform. If the destination is an existing file, that file will be overwritten.
| [in] | file_source | The file to copy. |
| [in] | file_dest | The destination of the copied file. |
| [out] | error | The result of the copy. |
Definition at line 78 of file file_opts.f.
| subroutine file_opts::create_directory | ( | character (len=*), intent(in) | directory_source, |
| integer, intent(out) | error | ||
| ) |
Makes a directory.
Creates new directory by calling the appropriate command for the plaform.
| [in] | directory_source | The directory to create. |
| [out] | error | The result of the copy. |
Definition at line 249 of file file_opts.f.
| subroutine file_opts::delete_directory | ( | character (len=*), intent(in) | directory_source, |
| integer, intent(out) | error | ||
| ) |
Deletes a directory.
Deletes directory by calling the appropriate command for the plaform. This deletes all files inside the directory as well.
| [in] | directory_source | The directory to delete. |
| [out] | error | The result of the copy. |
Definition at line 279 of file file_opts.f.
| subroutine file_opts::delete_file | ( | character (len=*), intent(in) | file_source, |
| integer, intent(out) | error | ||
| ) |
Deletes a file.
Deletes a file by calling the appropriate command for the platform. Ignores errors if the file doesn't exisit.
| [in] | file_source | The file to delete. |
| [out] | error | The result of the copy. |
Definition at line 215 of file file_opts.f.
| character (len=path_length) function file_opts::get_path_of_file | ( | character (len=*), intent(in) | file | ) |
Returns the directory of a file.
Searches a path for last path separator and returns the directory path.
| [in] | file | Path to file. |
Definition at line 354 of file file_opts.f.
| logical function file_opts::is_absolute_path | ( | character (len=*), intent(in) | path | ) |
Queries if the a path is absoulte.
Determines if the root of a path exists or if the path is relative. If the path is absoulte return true. If the path is relative return false. An empty path is treated as absoulte.
| [in] | path | Path to test. |
Definition at line 309 of file file_opts.f.
| subroutine file_opts::move_file | ( | character (len=*), intent(in) | file_source, |
| character (len=*), intent(in) | file_dest, | ||
| integer, intent(out) | error | ||
| ) |
Moves the source file to the destination.
Moves a file by calling the appropriate command for the platform. If the destination is an existing file, that file will be overwritten.
| [in] | file_source | The file to move. |
| [in] | file_dest | The destination of the moved file. |
| [out] | error | The result of the move. |
Definition at line 37 of file file_opts.f.
1.8.17