Append a filename to the end of a path.

Synopsis

Declared in <bdls_pathutil.h>

static
void
appendRaw(
    bsl::string* path,
    char const* filename,
    int length = ‐1,
    int rootEnd = ‐1);

Description

Append the specified filename up to the optionally specified length to the end of the specified path. If length is negative, append the entire string. If the optionally specified rootEnd offset is non‐negative, it is taken as the position in path of the character following the root. The behavior is undefined if filename represents an absolute path or if either filename or path ends with the filesystem separator character. The behavior is also undefined if filename points to any part of path (i.e., filename may not be an alias for path). See []and Performance).

Parameters

Name

Description

path

path to which filename is appended

filename

null‐terminated filename to append

length

maximum number of characters of filename to append; if negative, append the entire string

rootEnd

if non‐negative, position in path of the character following the root

Created with MrDocs