File#
- class pyopenms.File#
Bases:
objectBasic file handling operations
- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)absolutePath(file)Get the absolute path
basename(file)Get the basename of a file path
empty(file)exists(file)Check if a file exists
fileList(dir, file_pattern[, full_path])Returns list of files matching @p file_pattern in @p dir (returns filenames without paths unless @p full_path is true)
find(filename, directories)findDatabase(db_name)findDoc(filename)findExecutable(exe_filename)Get the temp directory
getTemporaryFile([alternative_file])getUniqueName([include_hostname])Get a unique name
Get the user home directory
isDirectory(path)Check if a path is a directory
path(file)Get the directory path of a file
readable(file)Check if a file is readable
remove(file)removeDirRecursively(dir_name)rename(from, to, overwrite_existing, verbose)writable(file)Check if a file is writable
- static absolutePath(file: str) str#
Get the absolute path
- static basename(file: str) str#
Get the basename of a file path
- static empty(file: str) bool#
- static exists(file: str) bool#
Check if a file exists
- static fileList(dir: str, file_pattern: str, full_path: bool = False) list[str]#
Returns list of files matching @p file_pattern in @p dir (returns filenames without paths unless @p full_path is true)
- static find(filename: str, directories: list[str]) str#
- static findDatabase(db_name: str) str#
- static findDoc(filename: str) str#
- static findExecutable(exe_filename: str) bool#
- static getExecutablePath() str#
- static getOpenMSDataPath() str#
- static getOpenMSHomePath() str#
- static getSystemParameters() pyopenms.Param#
- static getTempDirectory() str#
Get the temp directory
- static getTemporaryFile(alternative_file: str = '') str#
- static getUniqueName(include_hostname: bool = True) str#
- static getUniqueName() str
Get a unique name
- static getUserDirectory() str#
Get the user home directory
- static isDirectory(path: str) bool#
Check if a path is a directory
- static path(file: str) str#
Get the directory path of a file
- static readable(file: str) bool#
Check if a file is readable
- static remove(file: str) bool#
- static removeDirRecursively(dir_name: str) bool#
- static rename(from: str, to: str, overwrite_existing: bool, verbose: bool) bool#
- static writable(file: str) bool#
Check if a file is writable