1#ifndef BIORBD_UTILS_PATH_H
2#define BIORBD_UTILS_PATH_H
8#include "biorbdConfig.h"
10namespace BIORBD_NAMESPACE {
27 Path(
const char* path);
39 Path(
const std::basic_string<char>& path);
235 std::shared_ptr<String>
void setFolder(const String &folder)
Set the folder of the file.
void setIsFolderAbsolute()
Set if folder is absolute.
void createFolder() const
To create folder on the computer.
const String & originalPath() const
Return original path as it was at constructor time.
String absolutePath() const
Return the absolute path relative to root.
bool isFileReadable() const
Test if file exist on the computer and is accessible.
std::shared_ptr< String > m_folder
The folder.
bool isFileExist() const
Test if file exist on the computer.
const String & filename() const
Return the filename.
bool isFolderExist() const
Test if folder exists on the computer.
static String currentDir()
String relativePath() const
Return relative path to current working directory.
static void parseFileName(const String &path, String &folder, String &filename, String &extension)
Parse a path in folder, filename and extension.
static String toUnixFormat(const String &path)
Return the path to Unix format.
std::shared_ptr< String > m_originalPath
The original path at construction time.
std::shared_ptr< bool > m_isFolderAbsolute
If folder is absolute.
static String absoluteFolder(const Path &path)
Return the absolute path relative to root.
const String & folder() const
Return the folder of the file.
std::shared_ptr< String > m_filename
The filename.
void setExtension(const String &ext)
Set the extension.
const String & extension() const
Return the extension of the file.
std::shared_ptr< String > m_extension
The extension.
static String toWindowsFormat(const String &path)
Return the path to Windows format.
void setFilename(const String &name)
Set the filename.
Path DeepCopy() const
Deep copy of path.
Wrapper around the std::string class with augmented functionality.