7 #ifndef GDCORE_ABSTRACTFILESYSTEM
8 #define GDCORE_ABSTRACTFILESYSTEM
10 #include "GDCore/String.h"
An interface to manipulate files in a platform agnostic way. This allow exporters to work on files wi...
Definition: AbstractFileSystem.h:24
virtual bool MakeAbsolute(gd::String &filename, const gd::String &baseDirectory)=0
Change the filename so that it is absolute, using the base directory passed as parameter.
virtual gd::String DirNameFrom(const gd::String &file)=0
Extract the path without the filename.
virtual bool DirExists(const gd::String &path)=0
Return true if the specified directory exists.
virtual std::vector< gd::String > ReadDir(const gd::String &path, const gd::String &extension="")=0
Return a vector containing the files in the specified path.
virtual bool MakeRelative(gd::String &filename, const gd::String &baseDirectory)=0
Change the filename so that it is relative to the base directory passed as parameter.
virtual bool WriteToFile(const gd::String &file, const gd::String &content)=0
Write the content of a string to a file.
virtual gd::String FileNameFrom(const gd::String &file)=0
Extract the name of the file (with its extension) from a path.
virtual bool FileExists(const gd::String &path)=0
Return true if the specified file exists.
virtual gd::String ReadFile(const gd::String &file)=0
Read the content of a file.
virtual gd::String GetTempDir()=0
Get a directory suitable for temporary files.
virtual bool IsAbsolute(const gd::String &filename)=0
Return true if the filename is absolute.
virtual void MkDir(const gd::String &path)=0
Create the specified directory.
virtual bool ClearDir(const gd::String &directory)=0
Clear the directory given as parameter, removing all the files.
virtual bool CopyFile(const gd::String &file, const gd::String &destination)=0
Copy a file.
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24