MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Types | Static Public Member Functions | Static Public Attributes
PathTraitsFS Struct Reference

This class describes the nature of a native filesystem path. More...

`#include <Traits.hxx>`

## Public Types
typedef std::string | string
typedef string::traits_type | char_traits
typedef char_traits::char_type | value_type
typedef StringPointer< value_type > | Pointer
typedef Pointer::pointer_type | pointer_type
typedef Pointer::const_pointer_type | const_pointer_type

## Static Public Member Functions
static constexpr bool | IsSeparator (value_type ch)
gcc_pure static gcc_nonnull_all const_pointer_type | FindLastSeparator (const_pointer_type p)
gcc_pure static gcc_nonnull_all bool | IsAbsolute (const_pointer_type p)
gcc_pure static gcc_nonnull_all size_t | GetLength (const_pointer_type p)
gcc_pure static gcc_nonnull_all const_pointer_type | Find (const_pointer_type p, value_type ch)
gcc_pure static gcc_nonnull_all const_pointer_type | GetBase (const_pointer_type p)
| Determine the "base" file name of the given native path. More...
gcc_pure static gcc_nonnull_all string | GetParent (const_pointer_type p)
| Determine the "parent" file name of the given native path. More...
gcc_pure static gcc_nonnull_all const_pointer_type | Relative (const_pointer_type base, const_pointer_type other)
| Determine the relative part of the given path to this object, not including the directory separator. More...
gcc_pure static gcc_nonnull_all string | Build (const_pointer_type a, size_t a_size, const_pointer_type b, size_t b_size)
| Constructs the path from the given components. More...
gcc_pure static gcc_nonnull_all string | Build (const_pointer_type a, const_pointer_type b)

## Static Public Attributes
static constexpr value_type | SEPARATOR = '/'
static constexpr const_pointer_type | CURRENT_DIRECTORY = PATH_LITERAL(".")

## Detailed Description

This class describes the nature of a native filesystem path.

Definition at line 46 of file Traits.hxx.

## Member Typedef Documentation

typedef string::traits_type PathTraitsFS::char_traits

Definition at line 52 of file Traits.hxx.

typedef Pointer::const_pointer_type PathTraitsFS::const_pointer_type

Definition at line 56 of file Traits.hxx.

typedef StringPointer<value_type> PathTraitsFS::Pointer

Definition at line 54 of file Traits.hxx.

typedef Pointer::pointer_type PathTraitsFS::pointer_type

Definition at line 55 of file Traits.hxx.

typedef std::string PathTraitsFS::string

Definition at line 50 of file Traits.hxx.

typedef char_traits::char_type PathTraitsFS::value_type

Definition at line 53 of file Traits.hxx.

## Member Function Documentation

gcc_pure static gcc_nonnull_all string PathTraitsFS::Build | ( | const_pointer_type | a,
|  | size_t | a_size,
|  | const_pointer_type | b,
|  | size_t | b_size
| ) |  |
| static

Constructs the path from the given components.

If either of the components is empty string, remaining component is returned unchanged. If both components are empty strings, empty string is returned.

gcc_pure static gcc_nonnull_all string PathTraitsFS::Build | ( | const_pointer_type | a,
|  | const_pointer_type | b
| ) |  |
| inline static

Definition at line 158 of file Traits.hxx.

gcc_pure static gcc_nonnull_all const_pointer_type PathTraitsFS::Find | ( | const_pointer_type | p,
|  | value_type | ch
| ) |  |
| inline static

Definition at line 118 of file Traits.hxx.

gcc_pure static gcc_nonnull_all const_pointer_type PathTraitsFS::FindLastSeparator | ( | const_pointer_type | p | ) |
| inline static

Definition at line 75 of file Traits.hxx.

gcc_pure static gcc_nonnull_all const_pointer_type PathTraitsFS::GetBase | ( | const_pointer_type | p | ) |
| static

Determine the "base" file name of the given native path.

The return value points inside the given string.

gcc_pure static gcc_nonnull_all size_t PathTraitsFS::GetLength | ( | const_pointer_type | p | ) |
| inline static

Definition at line 113 of file Traits.hxx.

gcc_pure static gcc_nonnull_all string PathTraitsFS::GetParent | ( | const_pointer_type | p | ) |
| static

Determine the "parent" file name of the given native path.

As a special case, returns the string "." if there is no separator in the given input string.

gcc_pure static gcc_nonnull_all bool PathTraitsFS::IsAbsolute | ( | const_pointer_type | p | ) |
| inline static

Definition at line 99 of file Traits.hxx.

static constexpr bool PathTraitsFS::IsSeparator | ( | value_type | ch | ) |
| inline static

Definition at line 66 of file Traits.hxx.

gcc_pure static gcc_nonnull_all const_pointer_type PathTraitsFS::Relative | ( | const_pointer_type | base,
|  | const_pointer_type | other
| ) |  |
| static

Determine the relative part of the given path to this object, not including the directory separator.

Returns an empty string if the given path equals this object or nullptr on mismatch.

## Field Documentation

constexpr const_pointer_type PathTraitsFS::CURRENT_DIRECTORY = PATH_LITERAL(".")
| static

Definition at line 64 of file Traits.hxx.

constexpr value_type PathTraitsFS::SEPARATOR = '/'
| static

Definition at line 61 of file Traits.hxx.

The documentation for this struct was generated from the following file:

- fs/Traits.hxx