Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::Path Class Reference
Collaboration diagram for duckdb::Path:

Public Member Functions

string ToString () const
 
string GetBase () const
 
string GetPath () const
 
string GetTrailingSeparator () const
 
const string & GetScheme () const
 
const string & GetAuthority () const
 
const string & GetAnchor () const
 
char GetSeparator () const
 
bool HasScheme () const
 
bool HasAuthority () const
 
bool HasAnchor () const
 
bool HasDrive () const
 
char GetDriveChar () const
 
bool HasPathSegments () const
 
bool HasTrailingSeparator () const
 
bool IsAbsolute () const
 
bool IsLocal () const
 
bool IsRemote () const
 
const vector< string > & GetPathSegments () const
 
Path Join (const Path &rhs) const
 
Path Join (const string &rhs) const
 
template<typename... Args>
Path Join (const string &first, const Args &...rest) const
 
Path Join (const vector< string > &paths) const
 
Path Parent (int n=1) const
 

Static Public Member Functions

static Path FromString (const string &raw)
 
static string Normalize (const string &input)
 
static string AddSuffixToPath (const string &path, const string &suffix)
 

Private Member Functions

void NormalizeSegments (const string &raw, size_t path_offset)
 

Static Private Member Functions

static size_t ParseURIScheme (const string &input, Path &parsed)
 
static size_t ParseFilePathTail (const string &input, size_t start, Path &parsed)
 
static size_t ParseFileSchemes (const string &input, Path &parsed)
 

Private Attributes

string scheme
 
string authority
 
string anchor
 
vector< string > segments
 
char separator = '/'
 
bool has_trailing_separator = false
 
bool is_absolute = false
 

Member Function Documentation

◆ GetTrailingSeparator()

string duckdb::Path::GetTrailingSeparator ( ) const
inline
7987 { // returns "" or string(1, separator)
7988 return !segments.empty() && has_trailing_separator ? string(1, separator) : "";
7989 }

◆ GetScheme()

const string & duckdb::Path::GetScheme ( ) const
inline
7990 {
7991 return scheme;
7992 }

◆ GetAuthority()

const string & duckdb::Path::GetAuthority ( ) const
inline
7993 {
7994 return authority;
7995 }

◆ GetAnchor()

const string & duckdb::Path::GetAnchor ( ) const
inline
7996 {
7997 return anchor;
7998 }

◆ GetSeparator()

char duckdb::Path::GetSeparator ( ) const
inline
7999 {
8000 return separator;
8001 }

◆ HasScheme()

bool duckdb::Path::HasScheme ( ) const
inline
8003 {
8004 return !scheme.empty();
8005 }

◆ HasAuthority()

bool duckdb::Path::HasAuthority ( ) const
inline
8006 {
8007 return !authority.empty();
8008 }

◆ HasAnchor()

bool duckdb::Path::HasAnchor ( ) const
inline
8009 {
8010 return !anchor.empty();
8011 }

◆ HasPathSegments()

bool duckdb::Path::HasPathSegments ( ) const
inline
8016 {
8017 return !segments.empty();
8018 }

◆ HasTrailingSeparator()

bool duckdb::Path::HasTrailingSeparator ( ) const
inline
8020 {
8021 return has_trailing_separator;
8022 }

◆ IsAbsolute()

bool duckdb::Path::IsAbsolute ( ) const
inline
8024 {
8025 return is_absolute;
8026 }

◆ IsLocal()

bool duckdb::Path::IsLocal ( ) const
inline
8029 {
8030 // note: HasDrive() covers UNC locals too!
8031 return (!IsAbsolute() || !HasScheme() || HasDrive() || StringUtil::StartsWith(scheme, "file:"));
8032 }
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.

◆ IsRemote()

bool duckdb::Path::IsRemote ( ) const
inline
8034 {
8035 return !IsLocal();
8036 }

◆ GetPathSegments()

const vector< string > & duckdb::Path::GetPathSegments ( ) const
inline
8038 {
8039 return segments;
8040 }

◆ Join() [1/2]

template<typename... Args>
Path duckdb::Path::Join ( const string &  first,
const Args &...  rest 
) const
inline
8047 {
8048 return Join(first).Join(rest...);
8049 }

◆ Join() [2/2]

Path duckdb::Path::Join ( const vector< string > &  paths) const
inline
8051 {
8052 Path result = *this;
8053 for (const auto &rhs : paths) {
8054 result = result.Join(rhs);
8055 }
8056 return result;
8057 }

◆ Normalize()

static string duckdb::Path::Normalize ( const string &  input)
inlinestatic
8062 {
8063 return FromString(input).ToString();
8064 }

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