GeNN  4.0.0
GPU enhanced Neuronal Networks (GeNN)
filesystem::path 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 ()
 
 path (const path &path)
 
 path (path &&path)
 
 path (const char *string)
 
 path (const std::string &string)
 
size_t length () const
 
bool empty () const
 
bool is_absolute () const
 
path 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 parent_path () const
 
path operator/ (const path &other) const
 
std::string str (path_type type=native_path) const
 
void set (const std::string &str, path_type type=native_path)
 
pathoperator= (const path &path)
 
pathoperator= (path &&path)
 
bool remove_file ()
 
bool resize_file (size_t target_length)
 
bool operator== (const path &p) const
 
bool operator!= (const path &p) 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

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

Friends

std::ostream & operator<< (std::ostream &os, const path &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.

Member Enumeration Documentation

◆ path_type

Enumerator
windows_path 
posix_path 
native_path 

Constructor & Destructor Documentation

◆ path() [1/5]

filesystem::path::path ( )
inline

◆ path() [2/5]

filesystem::path::path ( const path path)
inline

◆ path() [3/5]

filesystem::path::path ( path &&  path)
inline

◆ path() [4/5]

filesystem::path::path ( const char *  string)
inline

◆ path() [5/5]

filesystem::path::path ( const std::string &  string)
inline

Member Function Documentation

◆ empty()

bool filesystem::path::empty ( ) const
inline

◆ exists()

bool filesystem::path::exists ( ) const
inline

◆ extension()

std::string filesystem::path::extension ( ) const
inline

◆ file_size()

size_t filesystem::path::file_size ( ) const
inline

◆ filename()

std::string filesystem::path::filename ( ) const
inline

◆ getcwd()

static path filesystem::path::getcwd ( )
inlinestatic

◆ is_absolute()

bool filesystem::path::is_absolute ( ) const
inline

◆ is_directory()

bool filesystem::path::is_directory ( ) const
inline

◆ is_file()

bool filesystem::path::is_file ( ) const
inline

◆ length()

size_t filesystem::path::length ( ) const
inline

◆ make_absolute()

path filesystem::path::make_absolute ( ) const
inline

◆ operator!=()

bool filesystem::path::operator!= ( const path p) const
inline

◆ operator/()

path filesystem::path::operator/ ( const path other) const
inline

◆ operator=() [1/2]

path& filesystem::path::operator= ( const path path)
inline

◆ operator=() [2/2]

path& filesystem::path::operator= ( path &&  path)
inline

◆ operator==()

bool filesystem::path::operator== ( const path p) const
inline

◆ parent_path()

path filesystem::path::parent_path ( ) const
inline

◆ remove_file()

bool filesystem::path::remove_file ( )
inline

◆ resize_file()

bool filesystem::path::resize_file ( size_t  target_length)
inline

◆ set()

void filesystem::path::set ( const std::string &  str,
path_type  type = native_path 
)
inline

◆ str()

std::string filesystem::path::str ( path_type  type = native_path) const
inline

◆ tokenize()

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

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ m_absolute

bool filesystem::path::m_absolute
protected

◆ m_path

std::vector<std::string> filesystem::path::m_path
protected

◆ m_type

path_type filesystem::path::m_type
protected

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