8#ifndef META_OCEAN_IO_PATH_H
9#define META_OCEAN_IO_PATH_H
99 inline bool isNull()
const;
163 explicit Path(
const std::string& value);
213 return !(*
this == path);
223 return (*
this)() < path();
Separator
Definition of path separators.
Definition Path.h:53
@ SEPARATOR_UNDEFINED
Undefined separator.
Definition Path.h:55
@ SEPARATOR_SLASH
Slash as separator.
Definition Path.h:57
@ SEPARATOR_BACKSLASH
Backslash as separator.
Definition Path.h:59
bool operator==(const Path &right) const
Returns whether two paths are equal.
void trim()
Trims this path.
bool isRelative() const
Returns whether this path is relative.
Definition Path.h:201
virtual bool isValid() const =0
Returns whether the path is valid.
void checkPath(const Type expectType)
Checks the type of this path and trims it.
std::string pathValue_
Path value.
Definition Path.h:188
bool isNull() const
Returns whether this path holds no valid.
Definition Path.h:206
bool operator!=(const Path &path) const
Returns whether two paths are not equal.
Definition Path.h:211
Type pathType_
Path type.
Definition Path.h:185
static char defaultSeparator()
Returns the default separator of a path.
bool operator<(const Path &path) const
Less operator comparing the actual strings of two paths.
Definition Path.h:221
virtual ~Path()=default
Destructs a path.
Path(const Path &path)=default
Copy constructor.
const std::string & operator()() const
Returns the value of this path.
Definition Path.h:216
Type
Definition of different path types.
Definition Path.h:34
@ TYPE_RELATIVE
Relative path.
Definition Path.h:44
@ TYPE_INVALID
Invalid path type.
Definition Path.h:36
@ TYPE_NETWORK
Network path.
Definition Path.h:46
@ TYPE_ABSOLUTE
Absolute path.
Definition Path.h:42
@ TYPE_DIRECTORY
Directory path.
Definition Path.h:40
@ TYPE_FILE
File path.
Definition Path.h:38
virtual bool exists() const =0
Returns whether the path exists already.
static bool isSeparator(const char character)
Returns whether a given character is a separator.
Path(const std::string &value)
Creates a new path.
Path()=default
Creates a new undefined path.
Type type() const
Returns the type of this path.
Definition Path.h:191
Path & operator=(const Path &path)=default
Default assign operator.
bool isAbsolute() const
Returns whether this path is absolute.
Definition Path.h:196
Namespace of the Ocean IO library.
Definition Base64.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15