armi.utils.pathTools module¶
This module contains commonly used functions relating to directories, files and path manipulations.
-
armi.utils.pathTools.getFullFileNames(directory='.', recursive=False)[source]¶ Returns the fully qualified file names from the specified directory.
-
armi.utils.pathTools.armiAbsPath(*pathParts)[source]¶ Convert a list of path components to an absolute path, without drive letters if possible.
This is mostly useful on Windows systems, where drive letters are not well defined across systems. In these cases, it is useful to try to convert to a UNC path if possible.
-
armi.utils.pathTools.fitPathToFormat(input_path, fmt)[source]¶ Clean string paths to end with the designated extension
-
armi.utils.pathTools.copyOrWarn(fileDescription, sourcePath, destinationPath)[source]¶ Copy a file, or warn if the file doesn’t exist.
- Parameters
fileDescription (str) – a description of the file and/or operation being performed.
sourcePath (str) – Path of the file to be copied.
destinationPath (str) – Path for the copied file.
-
armi.utils.pathTools.armiAbsDirFromName(modName)[source]¶ Convert a module name to a path.
Notes
This is often required in a Cython’d pyd extension where
__file__is otherwise invalid.