file¶
Bindings for utility::file namespace
- class pyrosetta.rosetta.utility.file.FileName¶
Bases:
pybind11_object
File name class supporting Windows and UN*X/Linux format names
- absolute(self: pyrosetta.rosetta.utility.file.FileName) bool ¶
Absolute path?
C++: utility::file::FileName::absolute() const –> bool
- assign(*args, **kwargs)¶
Overloaded function.
assign(self: pyrosetta.rosetta.utility.file.FileName, name_string: str) -> pyrosetta.rosetta.utility.file.FileName
String assignment
C++: utility::file::FileName::operator=(const std::string &) –> class utility::file::FileName &
assign(self: pyrosetta.rosetta.utility.file.FileName, : pyrosetta.rosetta.utility.file.FileName) -> pyrosetta.rosetta.utility.file.FileName
C++: utility::file::FileName::operator=(const class utility::file::FileName &) –> class utility::file::FileName &
- bare_name(self: pyrosetta.rosetta.utility.file.FileName) str ¶
Bare name (without volume or path or version)
C++: utility::file::FileName::bare_name() const –> std::string
- base(*args, **kwargs)¶
Overloaded function.
base(self: pyrosetta.rosetta.utility.file.FileName, base_a: str) -> pyrosetta.rosetta.utility.file.FileName
Base assignment
C++: utility::file::FileName::base(const std::string &) –> class utility::file::FileName &
base(self: pyrosetta.rosetta.utility.file.FileName) -> str
Base
C++: utility::file::FileName::base() const –> const std::string &
- clear(self: pyrosetta.rosetta.utility.file.FileName) pyrosetta.rosetta.utility.file.FileName ¶
Clear the file name
C++: utility::file::FileName::clear() –> class utility::file::FileName &
- empty(self: pyrosetta.rosetta.utility.file.FileName) bool ¶
Empty?
C++: utility::file::FileName::empty() const –> bool
- erase(self: pyrosetta.rosetta.utility.file.FileName) pyrosetta.rosetta.utility.file.FileName ¶
Erase the file name
C++: utility::file::FileName::erase() –> class utility::file::FileName &
- ext(*args, **kwargs)¶
Overloaded function.
ext(self: pyrosetta.rosetta.utility.file.FileName, ext_a: str) -> pyrosetta.rosetta.utility.file.FileName
Extension assignment
C++: utility::file::FileName::ext(const std::string &) –> class utility::file::FileName &
ext(self: pyrosetta.rosetta.utility.file.FileName) -> str
Extension
C++: utility::file::FileName::ext() const –> const std::string &
- extension(*args, **kwargs)¶
Overloaded function.
extension(self: pyrosetta.rosetta.utility.file.FileName, ext_a: str) -> pyrosetta.rosetta.utility.file.FileName
Extension assignment
C++: utility::file::FileName::extension(const std::string &) –> class utility::file::FileName &
extension(self: pyrosetta.rosetta.utility.file.FileName) -> str
Extension with separator
C++: utility::file::FileName::extension() const –> std::string
- local_name(self: pyrosetta.rosetta.utility.file.FileName) str ¶
Local name (without volume or path)
C++: utility::file::FileName::local_name() const –> std::string
- name(self: pyrosetta.rosetta.utility.file.FileName) str ¶
File name string
C++: utility::file::FileName::name() const –> std::string
- path(*args, **kwargs)¶
Overloaded function.
path(self: pyrosetta.rosetta.utility.file.FileName, path_a: str) -> pyrosetta.rosetta.utility.file.FileName
Path assignment
C++: utility::file::FileName::path(const std::string &) –> class utility::file::FileName &
path(self: pyrosetta.rosetta.utility.file.FileName) -> str
Path. Does not include final /
C++: utility::file::FileName::path() const –> const std::string &
- relative(self: pyrosetta.rosetta.utility.file.FileName) bool ¶
Relative path?
C++: utility::file::FileName::relative() const –> bool
- to_bare_name(self: pyrosetta.rosetta.utility.file.FileName) pyrosetta.rosetta.utility.file.FileName ¶
Change to bare name (without volume or path or version)
C++: utility::file::FileName::to_bare_name() –> class utility::file::FileName &
- to_local_name(self: pyrosetta.rosetta.utility.file.FileName) pyrosetta.rosetta.utility.file.FileName ¶
Change to local name (without volume or path)
C++: utility::file::FileName::to_local_name() –> class utility::file::FileName &
- ver(*args, **kwargs)¶
Overloaded function.
ver(self: pyrosetta.rosetta.utility.file.FileName, ver_a: str) -> pyrosetta.rosetta.utility.file.FileName
Version assignment
C++: utility::file::FileName::ver(const std::string &) –> class utility::file::FileName &
ver(self: pyrosetta.rosetta.utility.file.FileName) -> str
Version
C++: utility::file::FileName::ver() const –> const std::string &
- version(*args, **kwargs)¶
Overloaded function.
version(self: pyrosetta.rosetta.utility.file.FileName, ver_a: str) -> pyrosetta.rosetta.utility.file.FileName
Version assignment
C++: utility::file::FileName::version(const std::string &) –> class utility::file::FileName &
version(self: pyrosetta.rosetta.utility.file.FileName) -> str
Version with separator
C++: utility::file::FileName::version() const –> std::string
- vol(*args, **kwargs)¶
Overloaded function.
vol(self: pyrosetta.rosetta.utility.file.FileName, vol_a: str) -> pyrosetta.rosetta.utility.file.FileName
Volume assignment
C++: utility::file::FileName::vol(const std::string &) –> class utility::file::FileName &
vol(self: pyrosetta.rosetta.utility.file.FileName) -> str
Volume
C++: utility::file::FileName::vol() const –> const std::string &
- volume(*args, **kwargs)¶
Overloaded function.
volume(self: pyrosetta.rosetta.utility.file.FileName, vol_a: str) -> pyrosetta.rosetta.utility.file.FileName
Volume assignment
C++: utility::file::FileName::volume(const std::string &) –> class utility::file::FileName &
volume(self: pyrosetta.rosetta.utility.file.FileName) -> str
Volume
C++: utility::file::FileName::volume() const –> const std::string &
- class pyrosetta.rosetta.utility.file.PathName¶
Bases:
pybind11_object
Path name class supporting Windows and UN*X/Linux format names
- absolute(self: pyrosetta.rosetta.utility.file.PathName) bool ¶
Absolute path?
C++: utility::file::PathName::absolute() const –> bool
- assign(*args, **kwargs)¶
Overloaded function.
assign(self: pyrosetta.rosetta.utility.file.PathName, name_string: str) -> pyrosetta.rosetta.utility.file.PathName
String assignment
C++: utility::file::PathName::operator=(const std::string &) –> class utility::file::PathName &
assign(self: pyrosetta.rosetta.utility.file.PathName, : pyrosetta.rosetta.utility.file.PathName) -> pyrosetta.rosetta.utility.file.PathName
C++: utility::file::PathName::operator=(const class utility::file::PathName &) –> class utility::file::PathName &
- clear(self: pyrosetta.rosetta.utility.file.PathName) pyrosetta.rosetta.utility.file.PathName ¶
Clear the path name
C++: utility::file::PathName::clear() –> class utility::file::PathName &
- empty(self: pyrosetta.rosetta.utility.file.PathName) bool ¶
Empty?
C++: utility::file::PathName::empty() const –> bool
- erase(self: pyrosetta.rosetta.utility.file.PathName) pyrosetta.rosetta.utility.file.PathName ¶
Erase the path name
C++: utility::file::PathName::erase() –> class utility::file::PathName &
- name(self: pyrosetta.rosetta.utility.file.PathName) str ¶
Path name string
C++: utility::file::PathName::name() const –> std::string
- parent(self: pyrosetta.rosetta.utility.file.PathName) pyrosetta.rosetta.utility.file.PathName ¶
Returns the parent of this directory, or itself if no parent is available.
C++: utility::file::PathName::parent() const –> class utility::file::PathName
- path(*args, **kwargs)¶
Overloaded function.
path(self: pyrosetta.rosetta.utility.file.PathName, path_a: str) -> pyrosetta.rosetta.utility.file.PathName
Path assignment
C++: utility::file::PathName::path(const std::string &) –> class utility::file::PathName &
path(self: pyrosetta.rosetta.utility.file.PathName) -> str
Path
C++: utility::file::PathName::path() const –> const std::string &
- relative(self: pyrosetta.rosetta.utility.file.PathName) bool ¶
Relative path?
C++: utility::file::PathName::relative() const –> bool
- vol(*args, **kwargs)¶
Overloaded function.
vol(self: pyrosetta.rosetta.utility.file.PathName, vol_a: str) -> pyrosetta.rosetta.utility.file.PathName
Volume assignment
C++: utility::file::PathName::vol(const std::string &) –> class utility::file::PathName &
vol(self: pyrosetta.rosetta.utility.file.PathName) -> str
Volume
C++: utility::file::PathName::vol() const –> const std::string &
- volume(*args, **kwargs)¶
Overloaded function.
volume(self: pyrosetta.rosetta.utility.file.PathName, vol_a: str) -> pyrosetta.rosetta.utility.file.PathName
Volume assignment
C++: utility::file::PathName::volume(const std::string &) –> class utility::file::PathName &
volume(self: pyrosetta.rosetta.utility.file.PathName) -> str
Volume
C++: utility::file::PathName::volume() const –> const std::string &
- pyrosetta.rosetta.utility.file.change_working_directory(dir_path: str) bool ¶
Changes the current working directory
C++: utility::file::change_working_directory(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.combine_names(file_name_strings: pyrosetta.rosetta.utility.vector1_std_string) pyrosetta.rosetta.utility.file.FileName ¶
C++: utility::file::combine_names(class utility::vector1<std::string, class std::allocator<std::string > >) –> class utility::file::FileName
- pyrosetta.rosetta.utility.file.create_blank_file(blank_file: str) bool ¶
Create a blank file if it doesn’t already exist
C++: utility::file::create_blank_file(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.create_directory(dir_path: str) bool ¶
Create a directory if it doesn’t already exist
C++: utility::file::create_directory(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.create_directory_recursive(dir_path: str) bool ¶
Create a directory and its parent directories if they doesn’t already exist
C++: utility::file::create_directory_recursive(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.create_temp_filename(dir: str, prefix: str) str ¶
Find an unused random tempfile name with a given prefix (which may include a directory)
C++: utility::file::create_temp_filename(const std::string &, const std::string &) –> std::string
- pyrosetta.rosetta.utility.file.cwd() str ¶
current working directory
C++: utility::file::cwd() –> std::string
- pyrosetta.rosetta.utility.file.file_basename(filename: str) str ¶
Prefix of a file name
C++: utility::file::file_basename(const std::string &) –> std::string
- pyrosetta.rosetta.utility.file.file_delete(path: str) int ¶
Delete file
C++: utility::file::file_delete(const std::string &) –> int
- pyrosetta.rosetta.utility.file.file_exists(path: str) bool ¶
Does file exist?
C++: utility::file::file_exists(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.file_extension(filename: str) str ¶
Extension of a file name
C++: utility::file::file_extension(const std::string &) –> std::string
- pyrosetta.rosetta.utility.file.file_size(filename: str) int ¶
File size
C++: utility::file::file_size(const std::string &) –> long
- pyrosetta.rosetta.utility.file.get_home_dir() str ¶
Get the (absolute) path to the users home directory.
If homedir could not be found, it will return an empty string. Rocco Moretti
C++: utility::file::get_home_dir() –> std::string
- pyrosetta.rosetta.utility.file.gunzip(*args, **kwargs)¶
Overloaded function.
gunzip(compressedfile: str) -> int
gunzip(compressedfile: str, overwrite: bool) -> int
gunzip: file decompression
C++: utility::file::gunzip(const std::string &, bool) –> long
- pyrosetta.rosetta.utility.file.gzip(*args, **kwargs)¶
Overloaded function.
gzip(uncompressedfile: str) -> int
gzip(uncompressedfile: str, overwrite: bool) -> int
gzip: file compression
C++: utility::file::gzip(const std::string &, bool) –> long
- pyrosetta.rosetta.utility.file.is_directory(path: str) bool ¶
Is the file a directory?
C++: utility::file::is_directory(const std::string &) –> bool
- pyrosetta.rosetta.utility.file.list_dir(dir: str, files: pyrosetta.rosetta.utility.vector1_std_string) int ¶
generate sorted file listing for given directory, return non-zero value on error
C++: utility::file::list_dir(std::string, class utility::vector1<std::string, class std::allocator<std::string > > &) –> int
- pyrosetta.rosetta.utility.file.trytry_ifstream_open(ifstream_: pyrosetta.rosetta.std.ifstream, name: str, open_mode: std::_Ios_Openmode) bool ¶
Try to open file for read a few times just in case it is locked (from BOINC LIB)
C++: utility::file::trytry_ifstream_open(class std::basic_ifstream<char> &, const std::string &, enum std::_Ios_Openmode) –> bool
- pyrosetta.rosetta.utility.file.trytry_ofstream_open(ofstream_: pyrosetta.rosetta.std.ofstream, name: str, open_mode: std::_Ios_Openmode) bool ¶
Try to open file for write a few times just in case it is locked (from BOINC LIB)
C++: utility::file::trytry_ofstream_open(class std::basic_ofstream<char> &, const std::string &, enum std::_Ios_Openmode) –> bool