Sleeping Wombat Common Library  0.50.0
swCommonLibrary
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
path_impl Class Reference

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

 path_impl (const path_impl &path)
 
 path_impl (path_impl &&path)
 
 path_impl (const char *string)
 
 path_impl (const std::string &string)
 
size_t length () const
 
bool empty () const
 
bool is_absolute () const
 
path_impl make_absolute () const
 
bool exists () const
 
size_t file_size () const
 
bool is_directory () const
 
bool is_file () const
 
std::string extension () const
 
std::string filename () const
 
path_impl parent_path () const
 
path_impl operator/ (const path_impl &other) const
 
std::string str (path_type type=native_path) const
 
void set (const std::string &str, path_type type=native_path)
 
path_imploperator= (const path_impl &path)
 
path_imploperator= (path_impl &&path)
 
bool remove_file ()
 
bool resize_file (size_t target_length)
 
bool operator== (const path_impl &p) const
 
bool operator!= (const path_impl &p) const
 

Static Public Member Functions

static path_impl getcwd ()
 

Static Protected Member Functions

static std::vector< std::string > tokenize (const std::string &string, const std::string &delim)
 

Protected Attributes

path_type m_type
 
std::vector< std::string > m_path
 
bool m_absolute
 

Friends

std::ostream & operator<< (std::ostream &os, const path_impl &path)
 

Detailed Description

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.


The documentation for this class was generated from the following files: