Gorgon Game Engine
Filesystem.h File Reference

contains filesystem functions. More...

Include dependency graph for Filesystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EntryPoint
 This class represents filesystem entry points (roots, drives). More...
 
class  PathNotFoundError
 This object is thrown from functions that return information rather than status. More...
 

Namespaces

 Gorgon
 Root namespace for Gorgon Game Engine.
 
 Gorgon::Filesystem
 Contains filesystem functions.
 

Functions

std::string Canonical (const std::string &path)
 Canonicalizes a given relative path. More...
 
bool ChangeDirectory (const std::string &path)
 Changes current working directory. More...
 
template<template< class > class C_>
bool Copy (const C_< std::string > &source, const std::string &target)
 Copies list of files and/or directories from the given source to destination. More...
 
template<template< class, class > class C_, class A_ >
bool Copy (const C_< std::string, A_ > &source, const std::string &target)
 Copies list of files and/or directories from the given source to destination. More...
 
template<class I_ >
bool Copy (const I_ &begin, const I_ &end, const std::string &target)
 Copies list of files and/or directories from the given source to destination. More...
 
bool Copy (const std::string &source, const std::string &target)
 Copies a file or directory from the given source to destination. More...
 
template<template< class > class C_>
bool Copy (const std::string &sourcedir, const C_< std::string > &source, const std::string &target)
 Copies list of files and/or directories from the given source to destination. More...
 
template<class I_ >
bool Copy (const std::string &sourcedir, const I_ &begin, const I_ &end, const std::string &target)
 Copies list of files and/or directories from the given source to destination. More...
 
bool CreateDirectory (const std::string &path)
 Creates a new directory. More...
 
std::string CurrentDirectory ()
 Returns the current working directory. More...
 
bool Delete (const std::string &path)
 Deletes the given file or directory. More...
 
std::vector< EntryPoint > EntryPoints ()
 This function returns all entry points in the current system. More...
 
std::string ExeDirectory ()
 Returns the directory where the program resides. More...
 
std::string ExePath ()
 Returns the the full path of the application. More...
 
std::string GetBasename (std::string path)
 Returns the filename from the given path, without extension. More...
 
std::string GetDirectory (std::string filepath)
 Returns the directory portion of a file path. More...
 
std::string GetExtension (std::string path)
 Returns the extension of the given path, also converts the extension to lower case. More...
 
std::string GetFilename (std::string path)
 Returns the filename portion of a file path. More...
 
void Initialize ()
 Initializes the filesystem module. More...
 
bool IsDirectory (const std::string &path)
 Checks whether the given path is a directory. More...
 
bool IsExists (const std::string &path)
 Checks whether the given path exists. More...
 
bool IsFile (const std::string &path)
 Checks whether the given path is a file. More...
 
bool IsHidden (const std::string &path)
 Checks whether the given path is hidden. More...
 
bool IsWritable (const std::string &path)
 Checks whether the given path is writable. More...
 
std::string Join (std::string path1, const std::string &path2)
 Joins two given paths or a path and filename. More...
 
std::string Load (const std::string &filename)
 Loads the given file and returns it in a string form. More...
 
std::string LocateResource (const std::string &path, const std::string &directory="", bool localonly=true)
 Locates the given file or directory. More...
 
bool Move (const std::string &source, const std::string &target)
 Moves a given file or directory. More...
 
std::string Relative (std::string path, std::string base=".")
 Determine shortest relative path from the given path. More...
 
bool Save (const std::string &filename, const std::string &data, bool append=false)
 Saves a given data into the filename. More...
 
unsigned long long Size (const std::string &filename)
 Returns the size of the given file. More...
 
std::string StartupDirectory ()
 Returns the directory where the program is started from. More...
 

Detailed Description

contains filesystem functions.