Rosetta
|
Path name class supporting Windows and UN*X/Linux format names. More...
#include <PathName.hh>
Public Member Functions | |
PathName () | |
Default constructor. More... | |
PathName (std::string const &name_string) | |
String constructor. More... | |
~PathName ()=default | |
Destructor. More... | |
PathName & | operator= (std::string const &name_string) |
String assignment. More... | |
operator std::string () const | |
String conversion. More... | |
PathName & | operator() (PathName const &name) |
Functor copy assignment. More... | |
PathName & | operator() (std::string const &name_string) |
Functor string assignment. More... | |
PathName & | vol (std::string const &vol_a) |
Volume assignment. More... | |
PathName & | volume (std::string const &vol_a) |
Volume assignment. More... | |
PathName & | path (std::string const &path_a) |
Path assignment. More... | |
PathName & | erase () |
Erase the path name. More... | |
PathName & | clear () |
Clear the path name. More... | |
PathName | parent () const |
Returns the parent of this directory, or itself if no parent is available. 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. More... | |
std::string | name () const |
Path name string. More... | |
std::string | operator() () const |
Functor. More... | |
Private Member Functions | |
void | assign (std::string const &name_string) |
Parse and assign a path name string. More... | |
Static Private Member Functions | |
static bool | equal (PathName const &name1, PathName const &name2) |
PathNames equal on this platform? More... | |
Private Attributes | |
std::string | vol_ |
Volume (X:) (Windows only) More... | |
std::string | path_ |
Path (with trailing separator) More... | |
Friends | |
bool | operator== (PathName const &name1, PathName const &name2) |
PathName == PathName. More... | |
bool | operator!= (PathName const &name1, PathName const &name2) |
PathName != PathName. More... | |
bool | operator< (PathName const &name1, PathName const &name2) |
PathName < PathName. More... | |
bool | operator<= (PathName const &name1, PathName const &name2) |
PathName <= PathName. More... | |
bool | operator>= (PathName const &name1, PathName const &name2) |
PathName >= PathName. More... | |
bool | operator> (PathName const &name1, PathName const &name2) |
PathName > PathName. More... | |
std::istream & | operator>> (std::istream &stream, PathName &name) |
Input from stream. More... | |
std::ostream & | operator<< (std::ostream &stream, PathName const &name) |
Output to stream. More... | |
Path name class supporting Windows and UN*X/Linux format names.
|
inline |
Default constructor.
|
inline |
String constructor.
References assign().
|
inlinedefault |
Destructor.
bool utility::file::PathName::absolute | ( | ) | const |
|
private |
Parse and assign a path name string.
References path_, platform::file::PATH_SEPARATOR(), binder::replace(), vol_, and platform::file::VOLUME_USED().
Referenced by operator()(), operator=(), and PathName().
|
inline |
Clear the path name.
Referenced by pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
staticprivate |
PathNames equal on this platform?
References platform::file::CASE_SENSITIVE(), utility::file::equali(), path_, and vol_.
|
inline |
|
inline |
Path name string.
Referenced by pyrosetta.distributed.docs.ComponentDoc::__repr__(), utility::file::create_directory_recursive(), options_class.Option::getCName(), options_class.Option::getDoxygenRow(), options_class.Option::getMarkdownRow(), options_class.Option::getOptionKeysCC(), options_class.Option::getWikiTableRow(), operator std::string(), operator()(), parent(), 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 |
PathName utility::file::PathName::parent | ( | ) | const |
Returns the parent of this directory, or itself if no parent is available.
For relative paths, this will stop when it reaches the empty string – no "../" will be prepended to possibly go further up the directory tree.
References name(), path(), path_, and platform::file::PATH_SEPARATOR().
Referenced by utility::file::create_directory_recursive().
|
inline |
Path.
References path_.
Referenced by arls_impl.DockingFile::__cmp__(), arls_impl.DockingFile::__hash__(), arls_impl.DockingFile::__repr__(), and arls_impl.DockingFile::__str__().
PathName & utility::file::PathName::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__(), utility::file::FileName::FileName(), and parent().
bool utility::file::PathName::relative | ( | ) | const |
Relative path?
References absolute().
|
inline |
PathName & utility::file::PathName::vol | ( | std::string const & | vol_a | ) |
Volume assignment.
References runtime_assert, vol_, and platform::file::VOLUME_USED().
Referenced by utility::file::FileName::FileName().
|
inline |
Volume.
References vol_.
|
inline |
Volume assignment.
References vol().
|
friend |
Output to stream.
|
friend |
Input from stream.
|
private |
|
private |