| GlsMap Toolkit 1.10.2

Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
disti::VPFUtil::FilePath Class Reference

`#include <vpf_util.h>`

## Public Member Functions
| FilePath (void)
| FilePath (const FilePath &src)
| FilePath (const char *const path, const bool isDirectory)
const char * | Append (const char *const name, const bool isDirectory, const bool forceUpperCase=true, const bool killTrailingWS=true)
bool | IsValid (void) const
const char * | GetFilePath (void) const

## Static Public Attributes
static const char | DIR_SEPARATOR = '/'

## Protected Types
enum | { MAX_PATH_LENGTH = 512 }

## Protected Attributes
WarningBool | _isValid
char | _pathStr [MAX_PATH_LENGTH+1u]

## Detailed Description

encapsulates full path / full filename to a directory / file

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum
| protected

longest possible path

## Constructor & Destructor Documentation

## ◆ FilePath() [1/3]

VPFUtil::FilePath::FilePath | ( | void |  | ) |

Ctor

## ◆ FilePath() [2/3]

VPFUtil::FilePath::FilePath | ( | const FilePath & | src | ) |

copy Ctor

## ◆ FilePath() [3/3]

VPFUtil::FilePath::FilePath | ( | const char *const | path,
|  | const bool | isDirectory
| ) |  |

Construct from a path

Parameters

  path | path
  isDirectory | true if path is a directory path else false

## Member Function Documentation

## ◆ Append()

const char * VPFUtil::FilePath::Append | ( | const char *const | name,
|  | const bool | isDirectory,
|  | const bool | forceUpperCase = `true`,
|  | const bool | killTrailingWS = `true`
| ) |  |

Append a filename or directory name. Check IsValid()

Parameters

  name | name of file or directory (should not end in DIR_SEPARATOR)
  isDirectory | true if appending a directory name else false
  forceUpperCase | [optional, defaults to true] true to force appended string to all uppercase
  killTrailingWS | [optional, defaults to true] true to kill any traling whitespace in appended string

Returns
  updated path string

## ◆ GetFilePath()

const char * disti::VPFUtil::FilePath::GetFilePath | ( | void |  | ) | const
| inline

Get the file path string

Returns
  the file path string

## ◆ IsValid()

bool disti::VPFUtil::FilePath::IsValid | ( | void |  | ) | const
| inline

Determine if the path is valid

Returns
  true if valid else false

## Member Data Documentation

## ◆ _isValid

WarningBool disti::VPFUtil::FilePath::_isValid
| protected

true if path is valid else false

## ◆ _pathStr

char disti::VPFUtil::FilePath::_pathStr[MAX_PATH_LENGTH+1u]
| protected

full path plus terminator

## ◆ DIR_SEPARATOR

const char VPFUtil::FilePath::DIR_SEPARATOR = '/'
| static

directory separator char

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

- vpf_util.h
- vpf_util.cpp