BloombergLP::bdls::PathUtil

Utility for platform-independent filesystem path string manipulation.

Synopsis

Declared in <bdls_pathutil.h>

struct PathUtil;

Description

This struct contains utility methods for platform-independent manipulation of filesystem paths. No method of this struct provides any filesystem operations or accesses the filesystem as part of its implementation.

Static Member Functions

NameDescription
appendIfValid Append a relative filename to the end of a path.
appendRaw Append a filename to the end of a path.
getBasename Load the leaf (basename) element of a path.
getDirname Load the directory part of a path.
getExtension Load the extension of a path.
getLeaf Load the leaf element of a path.
getRoot Load the root portion of a path.
getRootEnd Return the position in a path of the character following the root.
hasLeaf Return whether a path has a leaf following the root.
isAbsolute Return whether a path is absolute.
isRelative Return whether a path is relative.
popLeaf Remove the leaf element from a path.
splitFilename Split a path into its head and last pathname component.

Static Data Members

NameDescription
k_SEPARATOR Character used as the preferred path separator on this platform.