18 #ifndef FOEDUS_FS_FILESYSTEM_HPP_ 
   19 #define FOEDUS_FS_FILESYSTEM_HPP_ 
  159 Path        
absolute(
const std::string& p);
 
  194 bool        remove(
const Path& p);
 
  205 SpaceInfo   
space(
const Path& p);
 
  210 std::string 
unique_name(uint64_t differentiator = 0);
 
  222 std::string 
unique_name(
const std::string& model, uint64_t differentiator = 0);
 
  238 bool        fsync(
const Path& path, 
bool sync_parent_directory = 
false);
 
  261 bool        atomic_rename(
const Path& old_path, 
const Path& new_path);
 
  292 #endif  // FOEDUS_FS_FILESYSTEM_HPP_ 
bool is_directory() const 
FilePermission permissions_
uint64_t available_
Less than free_. 
bool is_directory(const Path &p)
Returns if the file is a directory. 
Analogue of boost::filesystem::space_info. 
uint64_t remove_all(const Path &p)
Recursively deletes 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. ...
Forward declarations of classes in root package. 
FileStatus status(const Path &p)
Returns the status of the file. 
bool permissions_present() const 
Path current_path()
Returns the current working directory. 
bool create_directory(const Path &p, bool sync=false)
mkdir. 
FileStatus(FileType type, FilePermission permissions=kPermsNotKnown)
Analogue of boost::filesystem::path. 
bool durable_atomic_rename(const Path &old_path, const Path &new_path)
fsync() on source file before rename, then fsync() on the parent folder after rename. 
Path absolute(const std::string &p)
Returns the absolue path of the specified path. 
bool is_regular_file(const Path &p)
Returns if the file is a regular file. 
bool create_directories(const Path &p, bool sync=false)
Recursive mkdir (mkdirs). 
bool exists(const Path &p)
Returns if the file exists. 
FilePermission
Analogue of boost::filesystem::perm. 
SpaceInfo space(const Path &p)
Returns free space information for the device the file is on. 
bool is_regular_file() const 
bool rename(const Path &old_path, const Path &new_path)
Just a synonym of atomic_rename() to avoid confusion. 
uint64_t file_size(const Path &p)
Returns size of the file. 
friend std::ostream & operator<<(std::ostream &o, const SpaceInfo &v)
FileType
Analogue of boost::filesystem::file_type. 
std::string unique_name(uint64_t differentiator=0)
Equivalent to unique_path("%%%%-%%%%-%%%%-%%%%"). 
Analogue of boost::filesystem::file_status. 
bool status_known() const 
bool atomic_rename(const Path &old_path, const Path &new_path)
Renames the old file to the new file with the POSIX atomic-rename semantics. 
bool type_present() const 
assorted::FixedString< 508 > FixedPath
Represents a fixed (thus can be placed in shared memory) path string. 
bool fsync(const Path &path, bool sync_parent_directory=false)
Makes the content and metadata of the file durable all the way up to devices. 
uint64_t free_
Less than capacity_.