radarlib  1.4.6
Radar::Path Class Reference

File path manipulation routines. More...

#include <radarlib/io.hpp>

Static Public Member Functions

static std::string getBasePath (const std::string &path)
 Extract the parent directory path of a file or directory indicated. More...
 
static std::string getFileName (const std::string &path)
 Extract the file or directory name from a generic path. More...
 
static std::string getFileExt (const std::string &path)
 Extract the directory or file exstension without the dot. More...
 
static std::string changeExt (const std::string &path, const std::string &newext)
 Returns the path indicated after changing che extension. More...
 
static std::string removeExt (const std::string &path)
 Remove the extension from a file or directory path. More...
 

Detailed Description

File path manipulation routines.

This class provides functions to manipulate file paths, extension etc.

Member Function Documentation

◆ getBasePath()

std::string Radar::Path::getBasePath ( const std::string &  path)
static

Extract the parent directory path of a file or directory indicated.

Parameters
paththe path of a file or directory
Examples
pvolsplitter.cpp.

◆ getFileName()

std::string Radar::Path::getFileName ( const std::string &  path)
static

Extract the file or directory name from a generic path.

Parameters
paththe path of a file or directory
Examples
pvolsplitter.cpp.

◆ getFileExt()

std::string Radar::Path::getFileExt ( const std::string &  path)
static

Extract the directory or file exstension without the dot.

Parameters
paththe path of a file or directory

◆ changeExt()

std::string Radar::Path::changeExt ( const std::string &  path,
const std::string &  newext 
)
static

Returns the path indicated after changing che extension.

Parameters
paththe original path
newextthe new extension

◆ removeExt()

std::string Radar::Path::removeExt ( const std::string &  path)
static

Remove the extension from a file or directory path.

Parameters
paththe original path

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