plptools
Loading...
Searching...
No Matches
pathutils.h File Reference
#include "config.h"
#include <string>
#include <vector>
Include dependency graph for pathutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pathutils
 Conveniences for working with paths.
 

Enumerations

enum class  pathutils::PathFormat { pathutils::kPOSIX = 0 , pathutils::kWindows = 1 , pathutils::kHost = kPOSIX , pathutils::kEPOC = kWindows }
 

Functions

char pathutils::path_separator (const PathFormat format)
 
std::string pathutils::epoc_basename (std::string path)
 Returns the last path component of an EPOC path. More...
 
char * pathutils::epoc_dirname (const char *path)
 Compute parent directory of an EPOC directory. More...
 
char * pathutils::resolve_epoc_path (const char *path, const char *initialPath)
 Returns a new absolute EPOC path, determined by resolving path relative to initialPath. More...
 
std::vector< std::string > pathutils::split (const std::string &path, const PathFormat format)
 Split a path, path, into its components, using the path separator, separator. More...
 
std::string pathutils::join (const std::vector< std::string > &components, const PathFormat format)
 Return a new path by joining the path components, components, with path separator, separator. More...
 
bool pathutils::is_absolute (const std::string &path, const PathFormat format)
 Check if a path is absolute. More...
 
std::string pathutils::appending_components (const std::string &path, const std::vector< std::string > &components, const PathFormat format)
 Convenience wrapper for join that returns a new path resulting from appending path components, components, to path, path, using separator, separator. More...
 
std::string pathutils::resolve_path (const std::string &path, const std::string &startingPath, const PathFormat format)
 Returns a path by resolving a relative or absolute path against a starting path. More...