C++ Utilities  4.17.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Namespaces | Macros | Enumerations | Functions
path.h File Reference
#include "../global.h"
#include <list>
#include <string>
Include dependency graph for path.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 IoUtilities
 Contains utility classes helping to read and write streams.
 

Macros

#define PATH_SEP_CHAR   '/'
 
#define SEARCH_PATH_SEP_CHAR   ':'
 
#define PATH_SEP_STR   "/"
 
#define SEARCH_PATH_SEP_STR   ":"
 

Enumerations

enum  IoUtilities::DirectoryEntryType : unsigned char {
  IoUtilities::DirectoryEntryType::None = 0, IoUtilities::DirectoryEntryType::File = 1, IoUtilities::DirectoryEntryType::Directory = 2, IoUtilities::DirectoryEntryType::Symlink = 4,
  IoUtilities::DirectoryEntryType::All = 0xFF
}
 The DirectoryEntryType enum specifies the type of a directory entry (file, directory or symlink). More...
 

Functions

constexpr DirectoryEntryType IoUtilities::operator| (DirectoryEntryType lhs, DirectoryEntryType rhs)
 
DirectoryEntryType & IoUtilities::operator|= (DirectoryEntryType &lhs, DirectoryEntryType rhs)
 
constexpr DirectoryEntryType IoUtilities::operator & (DirectoryEntryType lhs, DirectoryEntryType rhs)
 
CPP_UTILITIES_EXPORT std::string IoUtilities::fileName (const string &path)
 Returns the file name and extension of the specified path string. More...
 
CPP_UTILITIES_EXPORT std::string IoUtilities::directory (const string &path)
 Returns the directory of the specified path string (including trailing slash). More...
 
CPP_UTILITIES_EXPORT void IoUtilities::removeInvalidChars (std::string &fileName)
 Removes invalid characters from the specified fileName. More...
 
CPP_UTILITIES_EXPORT bool IoUtilities::settingsDirectory (std::string &result, std::string applicationDirectoryName, bool createApplicationDirectory)
 Locates a directory meant to store application settings. More...
 
CPP_UTILITIES_EXPORT std::list< std::string > IoUtilities::directoryEntries (const char *path, DirectoryEntryType types)
 Returns the names of the directory entries in the specified path with the specified types. More...
 

Macro Definition Documentation

◆ PATH_SEP_CHAR

#define PATH_SEP_CHAR   '/'

Definition at line 15 of file path.h.

◆ PATH_SEP_STR

#define PATH_SEP_STR   "/"

Definition at line 17 of file path.h.

◆ SEARCH_PATH_SEP_CHAR

#define SEARCH_PATH_SEP_CHAR   ':'

Definition at line 16 of file path.h.

◆ SEARCH_PATH_SEP_STR

#define SEARCH_PATH_SEP_STR   ":"

Definition at line 18 of file path.h.