Rosetta
|
File name class supporting Windows and UN*X/Linux format names. More...
#include <FileName.hh>
Public Member Functions | |
FileName () | |
Default constructor. More... | |
FileName (std::string const &name_string) | |
String constructor. More... | |
FileName (std::string const &name_string, PathName const &use_path) | |
Uses filename from string but path and vol from PathName. More... | |
FileName (std::vector< FileName > const &file_names) | |
FileName vector constructor. More... | |
~FileName ()=default | |
Destructor. More... | |
FileName & | operator= (std::string const &name_string) |
String assignment. More... | |
operator std::string () const | |
String conversion. More... | |
FileName & | operator() (FileName const &name) |
Functor copy assignment. More... | |
FileName & | operator() (std::string const &name_string) |
Functor string assignment. More... | |
FileName & | vol (std::string const &vol_a) |
Volume assignment. More... | |
FileName & | volume (std::string const &vol_a) |
Volume assignment. More... | |
FileName & | path (std::string const &path_a) |
Path assignment. More... | |
FileName & | base (std::string const &base_a) |
Base assignment. More... | |
FileName & | ext (std::string const &ext_a) |
Extension assignment. More... | |
FileName & | extension (std::string const &ext_a) |
Extension assignment. More... | |
FileName & | version (std::string const &ver_a) |
Version assignment. More... | |
FileName & | ver (std::string const &ver_a) |
Version assignment. More... | |
FileName & | to_local_name () |
Change to local name (without volume or path) More... | |
FileName & | to_bare_name () |
Change to bare name (without volume or path or version) More... | |
FileName & | erase () |
Erase the file name. More... | |
FileName & | clear () |
Clear the file name. More... | |
bool | empty () const |
Empty? More... | |
bool | absolute () const |
Absolute path? More... | |
bool | relative () const |
Relative path? More... | |
std::string const & | vol () const |
Volume. More... | |
std::string const & | volume () const |
Volume. More... | |
std::string const & | path () const |
Path. Does not include final /. More... | |
std::string const & | base () const |
Base. More... | |
std::string const & | ext () const |
Extension. More... | |
std::string | extension () const |
Extension with separator. More... | |
std::string const & | ver () const |
Version. More... | |
std::string | version () const |
Version with separator. More... | |
std::string | name () const |
File name string. More... | |
std::string | operator() () const |
Functor. More... | |
std::string | local_name () const |
Local name (without volume or path) More... | |
std::string | bare_name () const |
Bare name (without volume or path or version) More... | |
Private Member Functions | |
void | assign (std::string const &name_string) |
Parse and assign a file name string. More... | |
Static Private Member Functions | |
static bool | equal (FileName const &name1, FileName const &name2) |
FileNames equal on this platform? More... | |
Private Attributes | |
std::string | vol_ |
Volume (X:) (Windows only) More... | |
std::string | path_ |
Path (with trailing separator) More... | |
std::string | base_ |
Base name (without path or extension or version) More... | |
std::string | ext_ |
Extension (without separator) More... | |
std::string | ver_ |
Version (without separator) More... | |
Friends | |
bool | operator== (FileName const &name1, FileName const &name2) |
FileName == FileName. More... | |
bool | operator!= (FileName const &name1, FileName const &name2) |
FileName != FileName. More... | |
bool | operator< (FileName const &name1, FileName const &name2) |
FileName < FileName. More... | |
bool | operator<= (FileName const &name1, FileName const &name2) |
FileName <= FileName. More... | |
bool | operator>= (FileName const &name1, FileName const &name2) |
FileName >= FileName. More... | |
bool | operator> (FileName const &name1, FileName const &name2) |
FileName > FileName. More... | |
std::istream & | operator>> (std::istream &stream, FileName &name) |
Input from stream. More... | |
std::ostream & | operator<< (std::ostream &stream, FileName const &name) |
Output to stream. More... | |
File name class supporting Windows and UN*X/Linux format names.
|
inline |
Default constructor.
|
inline |
String constructor.
References assign().
|
inline |
Uses filename from string but path and vol from PathName.
References assign(), path(), utility::file::PathName::path(), vol(), and utility::file::PathName::vol().
|
inline |
|
inlinedefault |
Destructor.
bool utility::file::FileName::absolute | ( | ) | const |
|
private |
Parse and assign a file name string.
References base_, ext_, path_, platform::file::PATH_SEPARATOR(), binder::replace(), ver_, vol_, and platform::file::VOLUME_USED().
Referenced by FileName(), operator()(), and operator=().
|
inline |
Bare name (without volume or path or version)
References base_, and extension().
Referenced by basic::database::full_cache_name(), and main().
|
inline |
Base assignment.
References base_.
Referenced by zinc1_homodimer_setup::apply(), zinc_helix_cap::apply(), InterfaceStrandFinderMover::apply(), HotspotPlacementMover::apply(), ExposedStrandMover::apply(), HDmakerMover::apply(), zinc1_homodimer_design::apply(), CrystFFTDock::apply(), InterfaceDDGBindJobInputter::fill_jobs(), zinc2_homodimer_setup::filter_clashes(), get_filename(), get_pos_from_fragfn(), main(), my_main(), and zinc2_homodimer_design::setup().
|
inline |
|
inline |
|
staticprivate |
FileNames equal on this platform?
References base_, platform::file::CASE_SENSITIVE(), utility::file::equali(), ext_, path_, ver_, and vol_.
|
inline |
|
inline |
Extension.
References ext_.
|
inline |
|
inline |
|
inline |
Extension assignment.
References ext_.
|
inline |
Local name (without volume or path)
References base_, extension(), and version().
|
inline |
File name string.
References base_, extension(), path_, version(), and vol_.
Referenced by pyrosetta.distributed.docs.ComponentDoc::__repr__(), zinc2_homodimer_setup::filter_clashes(), get_pos_from_fragfn(), options_class.Option::getCName(), options_class.Option::getDoxygenRow(), options_class.Option::getMarkdownRow(), options_class.Option::getOptionKeysCC(), options_class.Option::getWikiTableRow(), main(), utility::sql_database::session::open_sqlite3_session(), operator std::string(), operator()(), enumerate_junctions.DHR::print(), enumerate_junctions.DHR::to_component(), and enumerate_junctions.DHR::write_to_file().
|
inline |
String conversion.
References name().
|
inline |
Functor.
References name().
Functor copy assignment.
References name(), and operator=().
|
inline |
Functor string assignment.
References assign().
|
inline |
|
inline |
Path. Does not include final /.
References path_.
Referenced by arls_impl.DockingFile::__cmp__(), arls_impl.DockingFile::__hash__(), arls_impl.DockingFile::__repr__(), arls_impl.DockingFile::__str__(), and FileName().
FileName & utility::file::FileName::path | ( | std::string const & | path_a | ) |
Path assignment.
References path_, platform::file::PATH_SEPARATOR(), and binder::replace().
Referenced by arls_impl.DockingFile::__cmp__(), arls_impl.DockingFile::__hash__(), arls_impl.DockingFile::__repr__(), arls_impl.DockingFile::__str__(), StepWiseJobQueen::complete_larval_job_maturation(), basic::database::find_cache_file(), basic::database::full_cache_name(), main(), and utility::pathname().
bool utility::file::FileName::relative | ( | ) | const |
Relative path?
References absolute().
|
inline |
|
inline |
Change to local name (without volume or path)
Referenced by HBondReporter::apply(), and HBondReporter::load_job_data().
|
inline |
|
inline |
Version with separator.
References ver_.
Referenced by pyrosetta.EnergyMethod::__call__(), local_name(), and name().
|
inline |
|
inline |
FileName & utility::file::FileName::vol | ( | std::string const & | vol_a | ) |
Volume assignment.
References vol_, and platform::file::VOLUME_USED().
|
inline |
Volume.
References vol_.
|
inline |
Volume assignment.
References vol().
|
friend |
Output to stream.
|
friend |
Input from stream.
|
private |
Base name (without path or extension or version)
Referenced by assign(), bare_name(), base(), clear(), empty(), equal(), erase(), FileName(), local_name(), and name().
|
private |
Extension (without separator)
Referenced by assign(), clear(), empty(), equal(), erase(), ext(), extension(), and FileName().
|
private |
Path (with trailing separator)
Referenced by absolute(), assign(), clear(), empty(), equal(), erase(), FileName(), name(), path(), to_bare_name(), and to_local_name().
|
private |
Version (without separator)
Referenced by assign(), clear(), empty(), equal(), erase(), FileName(), to_bare_name(), ver(), and version().
|
private |
Volume (X:) (Windows only)
Referenced by assign(), clear(), empty(), equal(), erase(), FileName(), name(), to_bare_name(), to_local_name(), vol(), and volume().