30 if (s.size() > 0 && s.at(0) ==
'~'
31 && (s.size() == 1 || s.at(1) ==
'/')) {
34 pathname_.append(s.substr(1));
48 if (pos == pathname_.size()) {
49 return Path(pathname_);
51 return Path(pathname_.c_str() + pos);
57 if (pos == pathname_.size()) {
60 return Path(pathname_.substr(0, pos));
65 std::vector< Path > children;
67 DIR *d = ::opendir(
c_str());
69 for (dirent *e = ::readdir(d); e !=
nullptr; e = ::readdir(d)) {
70 if (e->d_name == std::string(
".") || e->d_name == std::string(
"..")) {
74 child /= std::string(e->d_name);
75 children.emplace_back(child);
std::ostream & operator<<(std::ostream &o, const DirectIoFile &v)
bool is_directory(const Path &p)
Returns if the file is a directory.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Path home_path()
Returns the absolute path of the home directory of the user running this process. ...
Path current_path()
Returns the current working directory.
std::vector< Path > child_paths() const
Analogue of boost::filesystem::path.
const std::string & string() const
static const char kPreferredSeparator
const char * c_str() const