Simple class for manipulating paths on Linux/Windows/Mac OS. More...
#include <path.h>
Public Types | |
enum | path_type { windows_path = 0, posix_path = 1, native_path = posix_path } |
Public Member Functions | |
bool | empty () const |
bool | exists () const |
std::string | extension () const |
size_t | file_size () const |
std::string | filename () const |
bool | is_absolute () const |
bool | is_directory () const |
bool | is_file () const |
size_t | length () const |
path | make_absolute () const |
bool | operator!= (const path &p) const |
path | operator/ (const path &other) const |
path & | operator= (const path &path) |
path & | operator= (path &&path) |
bool | operator== (const path &p) const |
path | parent_path () const |
path () | |
path (const path &path) | |
path (path &&path) | |
path (const char *string) | |
path (const std::string &string) | |
bool | remove_file () |
bool | resize_file (size_t target_length) |
void | set (const std::string &str, path_type type=native_path) |
std::string | str (path_type type=native_path) const |
Static Public Member Functions | |
static path | getcwd () |
Static Protected Member Functions | |
static std::vector< std::string > | tokenize (const std::string &string, const std::string &delim) |
Protected Attributes | |
bool | m_absolute |
std::vector< std::string > | m_path |
path_type | m_type |
Friends | |
std::ostream & | operator<< (std::ostream &os, const path &path) |
Simple class for manipulating paths on Linux/Windows/Mac OS.
This class is just a temporary workaround to avoid the heavy boost dependency until boost::filesystem is integrated into the standard template library at some point in the future.
enum path::path_type |
path::path | ( | ) | [inline] |
path::path | ( | const path & | path | ) | [inline] |
path::path | ( | path && | path | ) | [inline] |
path::path | ( | const char * | string | ) | [inline] |
path::path | ( | const std::string & | string | ) | [inline] |
bool path::empty | ( | ) | const [inline] |
bool path::exists | ( | ) | const [inline] |
std::string path::extension | ( | ) | const [inline] |
size_t path::file_size | ( | ) | const [inline] |
std::string path::filename | ( | ) | const [inline] |
static path path::getcwd | ( | ) | [inline, static] |
bool path::is_absolute | ( | ) | const [inline] |
bool path::is_directory | ( | ) | const [inline] |
bool path::is_file | ( | ) | const [inline] |
size_t path::length | ( | ) | const [inline] |
path path::make_absolute | ( | ) | const [inline] |
path path::parent_path | ( | ) | const [inline] |
bool path::remove_file | ( | ) | [inline] |
bool path::resize_file | ( | size_t | target_length | ) | [inline] |
void path::set | ( | const std::string & | str, |
path_type | type = native_path |
||
) | [inline] |
std::string path::str | ( | path_type | type = native_path | ) | const [inline] |
static std::vector<std::string> path::tokenize | ( | const std::string & | string, |
const std::string & | delim | ||
) | [inline, static, protected] |
std::ostream& operator<< | ( | std::ostream & | os, |
const path & | path | ||
) | [friend] |
bool path::m_absolute [protected] |
std::vector<std::string> path::m_path [protected] |
path_type path::m_type [protected] |