libfoedus-core
FOEDUS Core Library
|
Analogue of boost::filesystem::path. More...
Analogue of boost::filesystem::path.
Unlike boost::filesystem::path, this always brings a full path. As soon as this object is instantiated, we convert it to an absolute path with absolute().
#include <path.hpp>
Public Member Functions | |
Path () | |
Path (const Path &p) | |
Path (const std::string &s) | |
This one resolves ~ at beginning. More... | |
Path & | operator= (const Path &p) |
Path & | operator= (const std::string &s) |
Path & | operator+= (const Path &p) |
Path & | operator+= (const std::string &s) |
void | append_separator_if_needed () |
Path & | operator/= (const Path &p) |
Path & | operator/= (const std::string &s) |
const std::string & | native () const |
const char * | c_str () const |
const std::string & | string () const |
int | compare (const Path &p) const noexcept |
int | compare (const std::string &s) const |
Path | parent_path () const |
std::vector< Path > | child_paths () const |
Path | filename () const |
bool | root () const |
bool | empty () const |
bool | has_parent_path () const |
bool | has_filename () const |
Static Public Attributes | |
static const char | kPreferredSeparator = '/' |
Friends | |
std::ostream & | operator<< (std::ostream &o, const Path &v) |
|
inline |
Definition at line 41 of file path.hpp.
Referenced by compare(), filename(), and parent_path().
|
inline |
|
explicit |
This one resolves ~ at beginning.
Definition at line 29 of file path.cpp.
References foedus::fs::current_path(), foedus::fs::home_path(), kPreferredSeparator, and string().
|
inline |
Definition at line 51 of file path.hpp.
References kPreferredSeparator.
Referenced by operator/=().
|
inline |
Definition at line 64 of file path.hpp.
Referenced by foedus::fs::atomic_rename(), child_paths(), foedus::fs::create_directory(), foedus::fs::file_size(), foedus::fs::fsync(), foedus::externalize::Externalizable::load_from_file(), foedus::fs::DirectIoFile::open(), foedus::fs::space(), and foedus::fs::status().
std::vector< Path > foedus::fs::Path::child_paths | ( | ) | const |
Definition at line 64 of file path.cpp.
References c_str(), and foedus::fs::is_directory().
Referenced by foedus::fs::remove_all().
|
inlinenoexcept |
Definition at line 67 of file path.hpp.
Referenced by foedus::fs::operator!=(), foedus::fs::operator<(), and foedus::fs::operator==().
|
inline |
|
inline |
Definition at line 75 of file path.hpp.
Referenced by foedus::fs::create_directories(), and has_parent_path().
Path foedus::fs::Path::filename | ( | ) | const |
Definition at line 46 of file path.cpp.
References kPreferredSeparator, and Path().
|
inline |
|
inline |
Definition at line 76 of file path.hpp.
References empty(), and parent_path().
|
inline |
|
inline |
Definition at line 56 of file path.hpp.
References operator/=().
Referenced by operator/=().
|
inline |
Definition at line 57 of file path.hpp.
References append_separator_if_needed().
|
inline |
Path foedus::fs::Path::parent_path | ( | ) | const |
Definition at line 55 of file path.cpp.
References kPreferredSeparator, and Path().
Referenced by foedus::fs::create_directories(), foedus::fs::durable_atomic_rename(), foedus::fs::fsync(), has_parent_path(), foedus::fs::DirectIoFile::open(), and foedus::externalize::Externalizable::save_to_file().
|
inline |
|
inline |
Definition at line 65 of file path.hpp.
Referenced by foedus::fs::operator<<(), Path(), and foedus::snapshot::DumpFileSortedBuffer::to_string().
|
friend |
|
static |
Definition at line 39 of file path.hpp.
Referenced by append_separator_if_needed(), filename(), parent_path(), Path(), and root().