![]() |
Provide some basic file-handling routines. More...
Functions/Subroutines | |
integer function, public | get_next_io_unit () |
Finds the next unused unit number. More... | |
integer function, public | open_unformatted_outfile (file_name) |
Shorthand for opening a new unformatted file for writing (output file) More... | |
integer function | open_unformatted_infile (file_name) |
Open an unformatted file for reading. More... | |
integer function, public | open_outfile (file_name) |
Shorthand for opening a new file for writing (output file) More... | |
integer function, public | open_infile (file_name) |
Same for reading (input file) More... | |
subroutine, public | close_io_file (unit_no, file_name) |
Close an external file. More... | |
subroutine, public | delete_io_file (file_name, raise_error) |
Delete a file. More... | |
Variables | |
integer, parameter, private | min_unit =10 |
Minimum unit number. More... | |
integer, parameter, private | max_unit =9999 |
Maximum unit id. More... | |
Provide some basic file-handling routines.
Edited:
subroutine, public file_handling_class::close_io_file | ( | integer, intent(in) | unit_no, |
character(len=*), intent(in), optional | file_name | ||
) |
Close an external file.
This function is used to close a file and complain if it does not work.
[in] | unit_no | unit number |
[in] | file_name | for reporting |
Definition at line 143 of file file_handling_class.f90.
subroutine, public file_handling_class::delete_io_file | ( | character(len=*), intent(in), optional | file_name, |
logical, optional | raise_error | ||
) |
Delete a file.
This function is used to delete a file. If the file does not exist and raise_error is present, an error is raised.
[in] | file_name | for reporting |
raise_error | Raise error in case of failure |
Definition at line 191 of file file_handling_class.f90.
integer function, public file_handling_class::get_next_io_unit |
Finds the next unused unit number.
In case there is no open slot for a new file this subroutine will call an error. For example if there are more files open than max_unit, this error will get called.
Definition at line 39 of file file_handling_class.f90.
integer function, public file_handling_class::open_infile | ( | character(len=*), intent(in) | file_name | ) |
Same for reading (input file)
This function is used for read input files and complain if it does not work.
[in] | file_name | path to open |
Definition at line 125 of file file_handling_class.f90.
integer function, public file_handling_class::open_outfile | ( | character(len=*), intent(in) | file_name | ) |
Shorthand for opening a new file for writing (output file)
This function is used to open a file in order to write into it. It will also complain if it is not possible.
[in] | file_name | path to open |
Definition at line 107 of file file_handling_class.f90.
integer function file_handling_class::open_unformatted_infile | ( | character(len=*), intent(in) | file_name | ) |
Open an unformatted file for reading.
[in] | file_name | path to open |
Definition at line 88 of file file_handling_class.f90.
integer function, public file_handling_class::open_unformatted_outfile | ( | character(len=*), intent(in) | file_name | ) |
Shorthand for opening a new unformatted file for writing (output file)
[in] | file_name | path to open |
Definition at line 73 of file file_handling_class.f90.
|
private |
Maximum unit id.
Definition at line 22 of file file_handling_class.f90.
|
private |
Minimum unit number.
Definition at line 21 of file file_handling_class.f90.