ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_sysPath.F90 File Reference

Go to the source code of this file.

Data Types

type  pm_sysPath::verbatim_type
 This is the derived type with no components, whose instantiated objects are used to signify the verbatim interpretation of paths when passed to various procedures within the ParaMonte library.
More...
 
interface  pm_sysPath::ls
 Generate and return a list of all paths within the specified input path.
More...
 
interface  pm_sysPath::glob
 Generate and return the result of globing the specified input pattern.
More...
 
interface  pm_sysPath::isFailedGlob
 Generate and return .true. if the attempt to globing the specified input pattern fails, otherwise, return .false..
More...
 
interface  pm_sysPath::isFailedList
 Generate and return .true. if the attempt to fetch the directory listing of the specified input path fails, otherwise, return .false..
More...
 
interface  pm_sysPath::getPathPosixEscaped
 Generate and return a POSIX standard (Unix-like) version of the input POSIX-style-separated path where all the relevant POSIX reserved characters are properly escaped via (\).
More...
 
interface  pm_sysPath::setPathPosixEscaped
 Return a POSIX standard (Unix-like) version of the input POSIX-style-separated path where all the relevant POSIX reserved characters are properly escaped via (\).
More...
 
interface  pm_sysPath::getPathPosix
 Generate and return a POSIX-standard (Unix-like) path from the input Windows-style path.
More...
 
interface  pm_sysPath::setPathPosix
 Return a POSIX-standard (Unix-like) path from the input (Windows-style) path.
More...
 
interface  pm_sysPath::getPathWindows
 Generate and return a normalized Windows-style path from the input POSIX-style or Windows-style path, such that it conforms to the path conventions of the Windows Command Prompt (CMD).
More...
 
interface  pm_sysPath::setPathWindows
 Normalize the input POSIX-style or Windows-style path to a Windows-style path, such that it conforms to the path conventions of the Windows Command Prompt (CMD).
More...
 
interface  pm_sysPath::getPathHostNameIndex
 Generate and return the index of the last character of the hostname part of the input UNC path.
More...
 
interface  pm_sysPath::hasDriveLetter
 Generate and return .true. is the input Windows-style path begins with a drive-letter pattern like C:.
More...
 
interface  pm_sysPath::isPathAbsWindows
 Generate and return .true. is the input path is an absolute Windows path (whether existing or virtual), otherwise return .false..
More...
 
interface  pm_sysPath::isPathAbsPosix
 Generate and return .true. is the input path is an absolute POSIX path (whether existing or virtual), otherwise return .false..
More...
 
interface  pm_sysPath::getPathAbs
 Generate and return the absolute path corresponding to the input (potentially relative) path.
More...
 
interface  pm_sysPath::getDirCurrent
 Generate and return the Current Working Directory (CWD) of the runtime shell.
More...
 
interface  pm_sysPath::getDirHome
 Generate and return the Home Directory of the current user in the current runtime shell.
More...
 
interface  pm_sysPath::getPathExpandedUser
 Generate and return the input path wherein the initial tilde character (~) is expanded to the home directory of current user.
More...
 
interface  pm_sysPath::isFailedChangeDir
 Generate and return .true. if the attempt to set the current working directory to the input dir fails, otherwise return .false. upon success.
More...
 
interface  pm_sysPath::isFailedMakeDir
 Generate and return .true. if the attempt to create the requested directory path fails, otherwise return .false..
More...
 
interface  pm_sysPath::isFailedMakeDirTemp
 Generate and return .true. if the attempt to create a temporary directory fails.
Otherwise return .false. and set the output path to the newly created temporary directory.
More...
 
interface  pm_sysPath::isFailedCopy
 Generate and return .true. if the requested copy action failed, otherwise return .false. indicating success.
More...
 
interface  pm_sysPath::isFailedMove
 Generate and return .true. if the requested move action failed, otherwise return .false. indicating success.
More...
 
interface  pm_sysPath::isFailedRemove
 Generate and return .true. if the requested path removal action from the file system failed, otherwise return .false. indicating success.
More...
 
interface  pm_sysPath::getDirSep
 Generate and return the directory separator symbol based on the runtime system shell.
More...
 
interface  pm_sysPath::getDirSeps
 Generate and return all the directory separator symbols supported by the current runtime operating system based on the runtime system shell.
More...
 
interface  pm_sysPath::getPathSep
 Generate and return the path separator character used by the runtime processor shell for separating paths from each other in the PATH environmental variable.
More...
 
interface  pm_sysPath::getPathNew
 Generate and return a unique (directory or file) path name in the specified directory or the default current working directory.
More...
 
interface  pm_sysPath::getPathTemp
 Generate and return a unique (directory or file) path name in the temporary directory of the system or if there is none, in the current working directory of the program, optionally with the user-specified file name segments.
More...
 
interface  pm_sysPath::getPathJoined
 Generate and return the path that results from joining the two input path parts, separated by the specified directory separator or the preferred directory separator of the runtime shell.
More...
 
interface  pm_sysPath::isFile
 Generate and return .true. is the input path is a file (not a directory), otherwise return .false..
More...
 
interface  pm_sysPath::isDir
 Generate and return .true. is the input path is an extant system directory, otherwise return .false..
More...
 
interface  pm_sysPath::isExtant
 Generate and return .true. if the input path (whether a file or a directory) exists and .false. otherwise.
More...
 
interface  pm_sysPath::getPathVerbatimCMD
 Generate and return a path quoted with double quotation marks where all instances of double quotes \(\ms{"}\) within the path are removed.
More...
 
interface  pm_sysPath::getPathVerbatimPowerShell
 Generate and return a path quoted with single quotation marks where all instances of single quotes \(\ms{'}\) within the path are replaced with \(\ms{''}\).
More...
 
interface  pm_sysPath::getPathVerbatimPosix
 Generate and return a path quoted with single quotation marks where all instances of single quotes \(\ms{'}\) within the path are replaced with \(\ms{'\''}\).
More...
 
interface  pm_sysPath::getPathVerbatimFish
 Generate and return a path quoted with single quotation marks where all instances of backslashes within the path are replaced with double backslash and all single quotes \(\ms{'}\) are replaced with \(\ms{\'}\).
More...
 
interface  pm_sysPath::getPathVerbatim
 Generate and return a path quoted with single or double quotation marks whose metacharacters are also properly escaped depending on the runtime system shell.
More...
 
interface  pm_sysPath::getIndexDirName
 Generate and return the index of the last character of the dirname (directory part) of the input path.
More...
 
interface  pm_sysPath::getIndexBaseName
 Generate and return the index of the first character of the basename part of the input path.
More...
 
interface  pm_sysPath::getIndexExtName
 Generate and return the index of the first character of the file extension of the input path (if any extension exists).
More...
 
interface  pm_sysPath::getDirName
 Generate and return the dirname (directory name) part of the input path.
More...
 
interface  pm_sysPath::getExtName
 Generate and return the file extension part of the input path (including the leading dot in the file extension).
More...
 
interface  pm_sysPath::getBaseName
 Generate and return the basename part of the input path (i.e., all characters that appear after the last directory separator in the path).
More...
 
interface  pm_sysPath::getFileName
 Generate and return the filename part of the input path.
More...
 
interface  pm_sysPath::getPathMatch
 Generate and return a list of directory paths matching a requested system application.
More...
 
interface  pm_sysPath::setPathMatch
 Return a list of directory paths matching a requested system application.
More...
 

Modules

module  pm_sysPath
 This module contains classes and procedures for manipulating system file/folder paths.

 

Variables

character(*, SK), parameter pm_sysPath::MODULE_NAME = SK_"@pm_sysPath"
 
integer(IK), parameter pm_sysPath::MAX_LEN_FILE_NAME = MAX_NAME
 The scalar integer constant of default kind IK, representing the maximum system-allowed path length (260 on Windows, 255 on Unix).
More...
 
integer(IK), parameter pm_sysPath::MAX_LEN_FILE_PATH = MAX_PATH
 The scalar integer constant of default kind IK, representing the maximum system-allowed path length (260 on Windows, 4096 on Unix).
Note that the maximum file length path supported by the Intel compilers is also 4096.
More...
 
character(*, SK), parameter pm_sysPath::DIR_SEP_WINDOWS_ALL = SK_"\/"
 The scalar character constant of default kind SK, containing the directory separator characters recognized by the Windows operating systems.
More...
 
character(*, SK), parameter pm_sysPath::DIR_SEP_POSIX_ALL = SK_"/"
 The scalar character constant of default kind SK, containing the directory separator characters recognized by the POSIX-compliant systems.
More...
 
character(*, SK), parameter pm_sysPath::DIR_SEP_WINDOWS = SK_"\"
 The scalar character constant of default kind SK, containing the preferred directory separator character on Windows operating systems.
More...
 
character(*, SK), parameter pm_sysPath::DIR_SEP_POSIX = SK_"/"
 The scalar character constant of default kind SK, containing the preferred directory separator character on POSIX-compliant systems.
More...
 
character(*, SK), parameter pm_sysPath::DIR_SEP_ALL = SK_"/\"
 The scalar character constant of default kind SK, containing the directory separator characters recognized by all platforms supported in this library (POSIX and Windows).
More...
 
character(*, SK), parameter pm_sysPath::PATH_SEP_WINDOWS = SK_";"
 The scalar character constant of default kind SK, containing the preferred directory separator character on Windows operating systems.
More...
 
character(*, SK), parameter pm_sysPath::PATH_SEP_POSIX = SK_":"
 The scalar character constant of default kind SK, containing the preferred directory separator character on POSIX-compliant systems.
More...
 
character(*, SK), parameter pm_sysPath::PATH_SEP_ALL = SK_":;"
 The scalar character constant of default kind SK, containing the directory separator characters recognized by all platforms supported in this library (POSIX and Windows).
More...
 
type(verbatim_type), parameter pm_sysPath::verbatim = verbatim_type()
 The scalar constant of type verbatim_type that can be used to signify the verbatim interpretation of paths when passed to various procedures within the ParaMonte library.
More...
 
character(*, SK), parameter pm_sysPath::WIN32_NAMESPACE_FILE = SK_"\\?\"
 The scalar character constant of default kind SK, containing the prefix operating systems path-separator symbol ("\" in Windows, "/" in Unix).
More...
 
character(*, SK), parameter pm_sysPath::WIN32_NAMESPACE_DEVICE = SK_"\\.\"
 The scalar character constant of default kind SK, containing the operating systems path-separator symbol ("\" in Windows, "/" in Unix).
More...
 
character(*, SK), parameter pm_sysPath::ASCII_CONTROL_STR = achar( 1, SK) // achar( 2, SK) // achar( 3, SK) // achar( 4, SK) // achar( 5, SK) // achar( 6, SK) // achar( 7, SK) // achar( 8, SK) // achar( 9, SK) // achar(10, SK) // achar(11, SK) // achar(12, SK) // achar(13, SK) // achar(14, SK) // achar(15, SK) // achar(16, SK) // achar(17, SK) // achar(18, SK) // achar(19, SK) // achar(21, SK) // achar(22, SK) // achar(23, SK) // achar(24, SK) // achar(25, SK) // achar(26, SK) // achar(27, SK) // achar(28, SK) // achar(29, SK) // achar(30, SK) // achar(31, SK) // achar(127, SK)
 The scalar character of default kind SK containing the ASCII control characters that need special care in paths.
More...
 
character(*, SK), parameter pm_sysPath::WINDOWS_RESERVED_STR = SK_'\/<>:"|?*'//ASCII_CONTROL_STR
 The scalar character constant of default kind SK, containing the Windows reserved characters not allowed in filenames.
Note that the ASCII control characters (0-31) are also forbidden in Windows paths.
More...
 
character(1, SK), dimension(*), parameter pm_sysPath::WINDOWS_RESERVED_CHR = [( WINDOWS_RESERVED_STR(i:i), i = 1_IK, len(WINDOWS_RESERVED_STR,IK) )]
 The vector character constant of default kind SK of len = 1 containing the individual characters in WINDOWS_RESERVED_STR.
More...
 
character(*, SK), parameter pm_sysPath::WINDOWS_CMD_METACHAR_STR = SK_'()%!^"<>&|'
 The scalar character constant of default kind SK, containing the Windows CMD shell metacharacters.
More...
 
character(1, SK), dimension(*), parameter pm_sysPath::WINDOWS_CMD_METACHAR_CHR = [( WINDOWS_CMD_METACHAR_STR(i:i), i = 1_IK, len(WINDOWS_CMD_METACHAR_STR,IK) )]
 The vector character constant of default kind SK of len = 1 containing the individual characters in WINDOWS_CMD_METACHAR_STR.
More...
 
character(4, SK), dimension(*), parameter pm_sysPath::WINDOWS_RESERVED_DEVICE_NAME =[ SK_"CON " , SK_"PRN " , SK_"AUX " , SK_"NUL " , SK_"COM1" , SK_"COM2" , SK_"COM3" , SK_"COM4" , SK_"COM5" , SK_"COM6" , SK_"COM7" , SK_"COM8" , SK_"COM9" , SK_"LPT1" , SK_"LPT2" , SK_"LPT3" , SK_"LPT4" , SK_"LPT5" , SK_"LPT6" , SK_"LPT7" , SK_"LPT8" , SK_"LPT9" , SK_"con " , SK_"prn " , SK_"aux " , SK_"nul " , SK_"com1" , SK_"com2" , SK_"com3" , SK_"com4" , SK_"com5" , SK_"com6" , SK_"com7" , SK_"com8" , SK_"com9" , SK_"lpt1" , SK_"lpt2" , SK_"lpt3" , SK_"lpt4" , SK_"lpt5" , SK_"lpt6" , SK_"lpt7" , SK_"lpt8" , SK_"lpt9" ]
 The vector character constant of default kind SK, containing the Windows reserved (forbidden) file names.
No file or directory name can contain these names alone, possibly mixed with leading or trailing blanks.
More...
 
character(*, SK), parameter pm_sysPath::POSIX_RESERVED_STR = SK_" " // SK_"!" // SK_'"' // SK_"#" // SK_"$" // SK_"&" // SK_"'" // SK_"(" // SK_")" // SK_"*" // SK_"," // SK_";" // SK_"<" // SK_"=" // SK_">" // SK_"?" // SK_"[" // SK_"\" // SK_"]" // SK_"^" // SK_"`" // SK_"{" // SK_"|" // SK_"}" // SK_"~" // ASCII_CONTROL_STR
 The scalar character constant of default kind SK, containing the ASCII characters that require escaping via <ESC> character (if not double-quoted) within the Unix Shell environment.
More...
 
character(1, SK), dimension(*), parameter pm_sysPath::POSIX_RESERVED_CHR = [( POSIX_RESERVED_STR(i:i), i = 1_IK, len(POSIX_RESERVED_STR,IK) )]
 The vector character constant of default kind SK of len = 1 containing the individual characters in POSIX_RESERVED_STR.
More...
 
character(*, SK), parameter pm_sysPath::POSIX_RESERVED_DQUOTE_STR = SK_"`$\"""//achar(10, SK)
 The scalar character constant of default kind SK, containing the ASCII characters that require escaping via ESC (Escape) character within the Unix Shell environment even when the string double-quoted. Note that the history expansion character (!) is not included since it is meaningless in the POSIX standard.
See the GNU Bash manual for more information.
More...
 
character(1, SK), dimension(*), parameter pm_sysPath::POSIX_RESERVED_DQUOTE_CHR = [( POSIX_RESERVED_DQUOTE_STR(i:i), i = 1_IK, len(POSIX_RESERVED_DQUOTE_STR,IK) )]
 The vector character constant of default kind SK of len = 1 containing the individual characters in POSIX_RESERVED_DQUOTE_STR.
More...