Tools to manage files and directories in a compiler-independent way  
More...
Tools to manage files and directories in a compiler-independent way 
◆ create_directory()
      
        
          | subroutine mod_file_manager::create_directory | ( | character(len=*), intent(in) | directory | ) |  | 
      
 
Create a directory. 
- Attention
- This routine contains platform-dependent code
- Parameters
- 
  
    | [in] | directory | String containing the directory path. |  
 
 
 
◆ directory_exists()
      
        
          | logical function mod_file_manager::directory_exists | ( | character(len=*), intent(in) | directory | ) |  | 
      
 
Check if a directory exists. 
Provide a compiler-independant way to check if a directory exists.
- Parameters
- 
  
    | [in] | directory | String containing the directory path. |  
 
 
 
◆ ensure_directory_exists()
      
        
          | subroutine mod_file_manager::ensure_directory_exists | ( | character(len=*), intent(in) | directory, | 
        
          |  |  | logical, intent(in), optional | use_barrier ) | 
      
 
If the given directory does not exist, create the directory. 
- Parameters
- 
  
    | [in] | directory | String containing the directory path. |  | [in] | use_barrier | Optional flag to use a mpi_barrier after creating the file (default: false) |  
 
 
 
◆ escape_path()
      
        
          | character(len=:) function, allocatable mod_file_manager::escape_path | ( | character(len=*), intent(in) | path | ) |  | 
      
 
Replace any forbidden character by its escaped form. 
- Parameters
- 
  
    | [in] | path | String containing the path to escape. |  
 
 
 
◆ file_exists()
      
        
          | logical function mod_file_manager::file_exists | ( | character(len=*), intent(in) | filename | ) |  | 
      
 
Check if a file exists. 
- Parameters
- 
  
    | [in] | filename | String containing the file name. |  
 
 
 
◆ get_file_name()
      
        
          | character(len=:) function, allocatable mod_file_manager::get_file_name | ( | character(len=*), intent(in) | path | ) |  | 
      
 
Extract the filename of a given path. 
- Parameters
- 
  
    | [in] | path | String containing the path and the file name. |  
 
 
 
◆ get_file_path()
      
        
          | character(len=:) function, allocatable mod_file_manager::get_file_path | ( | character(len=*), intent(in) | filename | ) |  | 
      
 
Extract the path of a given file. 
- Parameters
- 
  
    | [in] | filename | String containing the file name. |  
 
 
 
◆ get_notus_path()
      
        
          | subroutine mod_file_manager::get_notus_path | ( | character(len=:), allocatable | path | ) |  | 
      
 
Find the path of Notus executable. 
- Parameters
- 
  
    | [out] | path | Path of Notus executable |  
 
 
 
◆ read_environment_variable()
      
        
          | character(len=:) function, allocatable mod_file_manager::read_environment_variable | ( | character(len=*), intent(in) | env, | 
        
          |  |  | logical, optional | is_fatal ) | 
      
 
Read an environment variable. 
- Parameters
- 
  
    | [in] | env | Name of the environment variable |  | [in] | is_fatal | Optional flag to stop Notus if the variable is not found |  
 
 
 
◆ replace_tilde_with_home()
      
        
          | character(len=:) function, allocatable mod_file_manager::replace_tilde_with_home | ( | character(len=*), intent(in) | path | ) |  | 
      
 
Replace '~' in path by the content of the 'HOME' environment variable. 
Also simplify path
- Parameters
- 
  
  
 
 
◆ simplify_path()
      
        
          | character(len=:) function, allocatable mod_file_manager::simplify_path | ( | character(len=*), intent(in) | path | ) |  | 
      
 
Simplify "//" in "/" in a path. 
- Parameters
- 
  
    | [in] | path | String containing the path to simpify. |