File/directory path related functions. More...
#include <vector>
#include <basis/config.h>
#include <stdlib.h>
#include <string.h>
#include <cctype>
#include <algorithm>
#include <sys/stat.h>
#include <basis/except.h>
#include <basis/os.h>
#include <basis/os/path.h>
Go to the source code of this file.
Namespaces | |
basis | |
basis::os | |
basis::os::path | |
Functions | |
std::string | basis::os::path::abspath (const std::string &path) |
Make path absolute. More... | |
std::string | basis::os::path::basename (const std::string &path) |
Get file name. More... | |
std::string | basis::os::path::dirname (const std::string &path) |
Get file directory. More... | |
bool | basis::os::path::exists (const std::string path) |
Test the existance of a file or directory. More... | |
bool | basis::os::path::hasext (const std::string &path, const std::set< std::string > *exts=NULL) |
Test whether a given path has an extension. More... | |
bool | basis::os::path::isabs (const std::string &path) |
Test whether a given path is absolute. More... | |
bool | basis::os::path::isdir (const std::string path) |
Test whether a given path is the path of an existent directory. More... | |
bool | basis::os::path::isfile (const std::string path) |
Test whether a given path is the path of an existent file. More... | |
bool | basis::os::path::islink (const std::string &path) |
Whether a given path is a symbolic link. More... | |
bool | basis::os::path::issep (char c) |
Determine if a given character is a path separator. More... | |
std::string | basis::os::path::join (const std::string &base, const std::string &path) |
Join two paths, e.g., base path and relative path. More... | |
std::string | basis::os::path::normpath (const std::string &path) |
Normalize path, i.e., remove occurences of "./", duplicate slashes,... More... | |
std::string | basis::os::path::ntpath (const std::string &path) |
Convert path to Windows representation. More... | |
std::string | basis::os::path::posixpath (const std::string &path) |
Convert path to Posix (e.g., Unix, Mac OS) representation. More... | |
std::string | basis::os::path::realpath (const std::string &path) |
Get canonical file path. More... | |
std::string | basis::os::path::relpath (const std::string &path, const std::string &base=std::string()) |
Make path relative. More... | |
void | basis::os::path::split (const std::string &path, std::string &head, std::string &tail) |
Split path into two parts. More... | |
std::vector< std::string > | basis::os::path::split (const std::string &path) |
Split path into two parts. More... | |
void | basis::os::path::splitdrive (const std::string &path, std::string &drive, std::string &tail) |
Get drive specification of Windows path. More... | |
std::vector< std::string > | basis::os::path::splitdrive (const std::string &path) |
Get drive specification of Windows path. More... | |
void | basis::os::path::splitext (const std::string &path, std::string &head, std::string &ext, const std::set< std::string > *exts=NULL, bool icase=false) |
Get file name extension. More... | |
std::vector< std::string > | basis::os::path::splitext (const std::string &path, const std::set< std::string > *exts=NULL) |
Get file name extension. More... | |
File/directory path related functions.
Definition in file path.cxx.