Euphoria
eu::io Namespace Reference

Classes

struct  Json
 
struct  JsonError
 
struct  ObjectQuery
 
struct  ListedFile
 
struct  FileList
 
struct  ReadRoot
 
struct  WriteRoot
 
struct  FileSystem
 
struct  ReadRootCatalog
 
struct  ReadRootPhysicalFolder
 
struct  WriteRootPhysicalFolder
 
struct  FilePath
 
struct  DirPath
 

Typedefs

using JsonResult = Result< Json, JsonError >
 

Enumerations

enum class  JsonErrorType { file_error , parse_error }
 

Functions

void write_chunk_to_file (std::shared_ptr< MemoryChunk > chunk, const std::string &full_path)
 
std::shared_ptr< MemoryChunkread_file_to_chunk (const std::string &full_path)
 
std::optional< std::string > read_file_to_string (const std::string &full_path)
 
std::string get_string_from_path_for_debugging (FileSystem *fs, const FilePath &p)
 
JsonResult read_json_file (FileSystem *fs, const FilePath &file_name)
 
std::string could_be (const std::string &invalid_value, const std::vector< std::string > &possible_values)
 
std::string combine_folder_and_path (const std::string &folder, const FilePath &path)
 
std::string combine_folder_and_path (const std::string &folder, const DirPath &path)
 
std::string make_sure_folder_ends_with_slash (const std::string &folder)
 
std::string to_string (const FilePath &p)
 
std::string to_string (const DirPath &p)
 
std::optional< DirPathresolve_relative (const DirPath &base)
 
std::optional< DirPathresolve_relative (const DirPath &base, const DirPath &root)
 
std::optional< FilePathresolve_relative (const FilePath &base)
 
std::optional< FilePathresolve_relative (const FilePath &base, const DirPath &root)
 
DirPath join (const DirPath &lhs, const DirPath &rhs)
 
FilePath join (const DirPath &lhs, const FilePath &rhs)
 
bool operator== (const DirPath &lhs, const DirPath &rhs)
 
bool operator== (const FilePath &lhs, const FilePath &rhs)
 
bool operator!= (const DirPath &lhs, const DirPath &rhs)
 
bool operator!= (const FilePath &lhs, const FilePath &rhs)
 
bool operator< (const DirPath &lhs, const DirPath &rhs)
 
bool operator< (const FilePath &lhs, const FilePath &rhs)
 

Typedef Documentation

◆ JsonResult

Definition at line 24 of file json.h.

Enumeration Type Documentation

◆ JsonErrorType

enum eu::io::JsonErrorType
strong
Enumerator
file_error 
parse_error 

Definition at line 21 of file json.h.

Function Documentation

◆ combine_folder_and_path() [1/2]

std::string eu::io::combine_folder_and_path ( const std::string &  folder,
const DirPath path 
)

Definition at line 275 of file vfs.cc.

◆ combine_folder_and_path() [2/2]

std::string eu::io::combine_folder_and_path ( const std::string &  folder,
const FilePath path 
)

Definition at line 268 of file vfs.cc.

◆ could_be()

std::string eu::io::could_be ( const std::string &  invalid_value,
const std::vector< std::string > &  possible_values 
)

Definition at line 89 of file json.cc.

◆ get_string_from_path_for_debugging()

std::string eu::io::get_string_from_path_for_debugging ( FileSystem fs,
const FilePath p 
)

Definition at line 21 of file json.cc.

◆ join() [1/2]

DirPath eu::io::join ( const DirPath lhs,
const DirPath rhs 
)

Definition at line 419 of file vfs_path.cc.

◆ join() [2/2]

FilePath eu::io::join ( const DirPath lhs,
const FilePath rhs 
)

Definition at line 435 of file vfs_path.cc.

◆ make_sure_folder_ends_with_slash()

std::string eu::io::make_sure_folder_ends_with_slash ( const std::string &  folder)

Definition at line 282 of file vfs.cc.

◆ operator!=() [1/2]

bool eu::io::operator!= ( const DirPath lhs,
const DirPath rhs 
)

Definition at line 458 of file vfs_path.cc.

◆ operator!=() [2/2]

bool eu::io::operator!= ( const FilePath lhs,
const FilePath rhs 
)

Definition at line 465 of file vfs_path.cc.

◆ operator<() [1/2]

bool eu::io::operator< ( const DirPath lhs,
const DirPath rhs 
)

Definition at line 471 of file vfs_path.cc.

◆ operator<() [2/2]

bool eu::io::operator< ( const FilePath lhs,
const FilePath rhs 
)

Definition at line 478 of file vfs_path.cc.

◆ operator==() [1/2]

bool eu::io::operator== ( const DirPath lhs,
const DirPath rhs 
)

Definition at line 444 of file vfs_path.cc.

◆ operator==() [2/2]

bool eu::io::operator== ( const FilePath lhs,
const FilePath rhs 
)

Definition at line 451 of file vfs_path.cc.

◆ read_file_to_chunk()

std::shared_ptr< MemoryChunk > eu::io::read_file_to_chunk ( const std::string &  full_path)

Definition at line 37 of file io.cc.

◆ read_file_to_string()

std::optional< std::string > eu::io::read_file_to_string ( const std::string &  full_path)

Definition at line 68 of file io.cc.

◆ read_json_file()

JsonResult eu::io::read_json_file ( FileSystem fs,
const FilePath file_name 
)

Definition at line 57 of file json.cc.

◆ resolve_relative() [1/4]

std::optional< DirPath > eu::io::resolve_relative ( const DirPath base)

Definition at line 349 of file vfs_path.cc.

◆ resolve_relative() [2/4]

std::optional< DirPath > eu::io::resolve_relative ( const DirPath base,
const DirPath root 
)

Definition at line 388 of file vfs_path.cc.

◆ resolve_relative() [3/4]

std::optional< FilePath > eu::io::resolve_relative ( const FilePath base)

Definition at line 400 of file vfs_path.cc.

◆ resolve_relative() [4/4]

std::optional< FilePath > eu::io::resolve_relative ( const FilePath base,
const DirPath root 
)

Definition at line 409 of file vfs_path.cc.

◆ to_string() [1/2]

std::string eu::io::to_string ( const DirPath p)

Definition at line 324 of file vfs_path.cc.

◆ to_string() [2/2]

std::string eu::io::to_string ( const FilePath p)

Definition at line 321 of file vfs_path.cc.

◆ write_chunk_to_file()

void eu::io::write_chunk_to_file ( std::shared_ptr< MemoryChunk chunk,
const std::string &  full_path 
)

Definition at line 13 of file io.cc.