Globals Library 1.0
Loading...
Searching...
No Matches
globals::file Type Reference

Public Member Functions

procedure, pass, public init (this, lun_err, fn, lun, io_flag, mandatory_input, folder, verbose, info)
 Static constructor for globals::file
 
procedure, pass, public kill (this, lun_err)
 Static destructor for globals::file
 
procedure, pass, public info (this, lun)
 Info procedure for globals::file
 

Static Public Member Functions

procedure, nopass, public get_dirname (str_file)
 Get directory name.
 

Public Attributes

logical exist = .false.
 Logical flag to check if file exists.
 
integer lun
 I/O unit number.
 
character(len=256) fn
 File or directory name.
 
character(len=256) fnloc
 Local file or directory name.
 

Member Function/Subroutine Documentation

◆ init()

procedure, pass, public globals::file::init ( class(file), intent(inout) this,
integer, intent(in) lun_err,
character(len=*), intent(in) fn,
integer, intent(in) lun,
character(len=*), intent(in) io_flag,
logical, intent(in), optional mandatory_input,
logical, intent(in), optional folder,
logical, intent(in), optional verbose,
integer, intent(inout), optional info )

Static constructor for globals::file


Parameters
[in]lun_errunit number for error messages
[in]fnname of the file
[in]lununit number to associate to the file
[in]io_flag"in" if filename is an input file and its existence must be checked, "out" if it is an output file
[in]mandatory_input(optional) specify if input file is mandatory: .true.: file is mandatory, stop if file does not exists (default value) .false.: file is optional, proceed if file does not exists
[in]folder(optional) specify if input file is a file or a folder:
  • .true.: input path is folder (check existence and not open unit)
  • .false.: input path is file (default value, check existence and open if mandatory_input = .true.)
[in]verbose(optional) logical flag for additional messages
[in,out]info(optional) flag for existence of file: returns -1 if file does not exist

◆ kill()

procedure, pass, public globals::file::kill ( class(file), intent(inout) this,
integer, intent(in) lun_err )

Static destructor for globals::file


Parameters
[in]lun_errunit number for output error message

◆ info()

procedure, pass, public globals::file::info ( class(file), intent(in) this,
integer, intent(in) lun )

Info procedure for globals::file


Print the name of the file and the associated unit number

Parameters
[in]lununit number for output message

◆ get_dirname()

procedure, nopass, public globals::file::get_dirname ( character(len=*), intent(in) str_file)
static

Get directory name.


Get directory name

Parameters
[in]lununit number for output message
Returns
(char) directory name

Member Data Documentation

◆ exist

logical globals::file::exist = .false.

Logical flag to check if file exists.

◆ lun

integer globals::file::lun

I/O unit number.

◆ fn

character (len=256) globals::file::fn

File or directory name.

◆ fnloc

character (len=256) globals::file::fnloc

Local file or directory name.


The documentation for this type was generated from the following file: