18 #ifndef FOEDUS_FS_PATH_HPP_
19 #define FOEDUS_FS_PATH_HPP_
42 Path(
const Path& p) : pathname_(p.pathname_) {}
44 explicit Path(
const std::string& s);
52 if (!pathname_.empty() && pathname_.at(pathname_.size() - 1) != kPreferredSeparator) {
63 const std::string&
native()
const {
return pathname_; }
64 const char*
c_str()
const {
return pathname_.c_str(); }
65 const std::string&
string()
const {
return pathname_; }
75 bool empty()
const {
return pathname_.empty(); }
82 std::string pathname_;
101 #endif // FOEDUS_FS_PATH_HPP_
Path & operator/=(const Path &p)
Path & operator=(const Path &p)
const std::string & native() const
bool has_filename() const
bool operator>(const Path &lhs, const Path &rhs)
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
bool operator==(const Path &lhs, const Path &rhs)
int compare(const std::string &s) const
#define CXX11_NOEXCEPT
Used in public headers in place of "noexcept" of C++11.
bool has_parent_path() const
Path & operator/=(const std::string &s)
Path & operator+=(const std::string &s)
std::vector< Path > child_paths() const
Analogue of boost::filesystem::path.
bool operator!=(const Path &lhs, const Path &rhs)
bool operator<=(const Path &lhs, const Path &rhs)
const std::string & string() const
friend std::ostream & operator<<(std::ostream &o, const Path &v)
bool operator>=(const Path &lhs, const Path &rhs)
bool operator<(const Path &lhs, const Path &rhs)
Path & operator+=(const Path &p)
static const char kPreferredSeparator
const char * c_str() const
Path & operator=(const std::string &s)
int compare(const Path &p) const noexcept
void append_separator_if_needed()