8#ifndef INCLUDED_BDLS_PATHUTIL
9#define INCLUDED_BDLS_PATHUTIL
337#include <bdlscm_version.h>
344#include <bsl_string.h>
345#include <bsl_string_view.h>
383#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
399 const char *filename,
403 const char *filename,
406#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
407 static void appendRaw(std::pmr::string *path,
408 const char *filename,
421 static int popLeaf(std::string *path,
int rootEnd = -1);
422#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
423 static int popLeaf(std::pmr::string *path,
int rootEnd = -1);
441#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
464#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
465 static int getDirname(std::pmr::string *dirname,
485#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
486 static int getLeaf(std::pmr::string *leaf,
503#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
524#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
525 static int getRoot(std::pmr::string *root,
608 return getLeaf(leaf, path, rootEnd);
618 return getLeaf(leaf, path, rootEnd);
621#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
629 return getLeaf(leaf, path, rootEnd);
Definition bslstl_stringview.h:471
Definition bslstl_string.h:1252
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdls_fdstreambuf.h:412
Definition bdls_pathutil.h:361
static bool isAbsolute(const bsl::string_view &path, int rootEnd=-1)
static void appendRaw(std::string *path, const char *filename, int length=-1, int rootEnd=-1)
static int getLeaf(std::string *leaf, const bsl::string_view &path, int rootEnd=-1)
static int getRootEnd(const bsl::string_view &path)
static int appendIfValid(bsl::string *path, const bsl::string_view &filename)
static void appendRaw(bsl::string *path, const char *filename, int length=-1, int rootEnd=-1)
static int getExtension(bsl::string *extension, const bsl::string_view &path, int rootEnd=-1)
static bool isRelative(const bsl::string_view &path, int rootEnd=-1)
static int appendIfValid(std::string *path, const bsl::string_view &filename)
static int getExtension(std::string *extension, const bsl::string_view &path, int rootEnd=-1)
static int getBasename(bsl::string *leaf, const bsl::string_view &path, int rootEnd=-1)
Definition bdls_pathutil.h:602
static const char k_SEPARATOR
Definition bdls_pathutil.h:364
static int getDirname(std::string *dirname, const bsl::string_view &path, int rootEnd=-1)
static void splitFilename(bsl::string_view *head, bsl::string_view *tail, const bsl::string_view &path, int rootEnd=-1)
static int getRoot(std::string *root, const bsl::string_view &path, int rootEnd=-1)
static int popLeaf(std::string *path, int rootEnd=-1)
static int getDirname(bsl::string *dirname, const bsl::string_view &path, int rootEnd=-1)
static int popLeaf(bsl::string *path, int rootEnd=-1)
static bool hasLeaf(const bsl::string_view &path, int rootEnd=-1)
static int getLeaf(bsl::string *leaf, const bsl::string_view &path, int rootEnd=-1)
static int getRoot(bsl::string *root, const bsl::string_view &path, int rootEnd=-1)