Euphoria
eu::io::FilePath Struct Reference

#include <vfs_path.h>

Public Member Functions

 FilePath (const std::string &p)
 
FilePath set_extension_copy (const std::string &ext) const
 
FilePath extend_extension_copy (const std::string &ext) const
 
std::tuple< DirPath, std::string > split_directories_and_file () const
 
DirPath get_directory () const
 
std::string get_file_with_extension () const
 
std::string get_filename_without_extension () const
 
std::string get_extension () const
 

Static Public Member Functions

static std::optional< FilePathfrom_script (const std::string &path)
 apply only minor changes, return null on invalid More...
 
static std::optional< FilePathfrom_dirty_source (const std::string &path)
 do everything possible to convert from dirty path to valid path More...
 
static std::optional< FilePathfrom_script_or_empty (const std::string &path)
 optional or not, log if error More...
 

Public Attributes

std::string path
 contains either . More...
 

Detailed Description

Definition at line 35 of file vfs_path.h.

Constructor & Destructor Documentation

◆ FilePath()

eu::io::FilePath::FilePath ( const std::string &  p)
explicit

Definition at line 205 of file vfs_path.cc.

Member Function Documentation

◆ extend_extension_copy()

FilePath eu::io::FilePath::extend_extension_copy ( const std::string &  ext) const

Definition at line 189 of file vfs_path.cc.

◆ from_dirty_source()

std::optional< FilePath > eu::io::FilePath::from_dirty_source ( const std::string &  path)
static

do everything possible to convert from dirty path to valid path

Definition at line 75 of file vfs_path.cc.

◆ from_script()

std::optional< FilePath > eu::io::FilePath::from_script ( const std::string &  path)
static

apply only minor changes, return null on invalid

Definition at line 46 of file vfs_path.cc.

◆ from_script_or_empty()

std::optional< FilePath > eu::io::FilePath::from_script_or_empty ( const std::string &  path)
static

optional or not, log if error

Definition at line 102 of file vfs_path.cc.

◆ get_directory()

DirPath eu::io::FilePath::get_directory ( ) const

Definition at line 137 of file vfs_path.cc.

◆ get_extension()

std::string eu::io::FilePath::get_extension ( ) const

Definition at line 161 of file vfs_path.cc.

◆ get_file_with_extension()

std::string eu::io::FilePath::get_file_with_extension ( ) const

Definition at line 144 of file vfs_path.cc.

◆ get_filename_without_extension()

std::string eu::io::FilePath::get_filename_without_extension ( ) const

Definition at line 151 of file vfs_path.cc.

◆ set_extension_copy()

FilePath eu::io::FilePath::set_extension_copy ( const std::string &  ext) const

Definition at line 170 of file vfs_path.cc.

◆ split_directories_and_file()

std::tuple< DirPath, std::string > eu::io::FilePath::split_directories_and_file ( ) const

Definition at line 116 of file vfs_path.cc.

Member Data Documentation

◆ path

std::string eu::io::FilePath::path

contains either .

/ or ~/ at the start has a file name and possible extension

Definition at line 39 of file vfs_path.h.


The documentation for this struct was generated from the following files: