29#ifndef NOMLIB_FILE_HEADERS
30#define NOMLIB_FILE_HEADERS
35#include "nomlib/config.hpp"
36#include "nomlib/system/IFile.hpp"
38#if defined ( NOM_PLATFORM_OSX ) || defined ( NOM_PLATFORM_POSIX )
40 #include "nomlib/system/unix/UnixFile.hpp"
42#elif defined ( NOM_PLATFORM_WINDOWS )
44 #include "nomlib/system/windows/WinFile.hpp"
61 std::string
extension(
const std::string& file)
const;
64 int32
size(
const std::string& file_path)
const;
67 bool is_dir(
const std::string& file_path)
const;
69 bool is_file(
const std::string& file_path)
const;
72 bool exists(
const std::string& file_path)
const;
77 std::string
path(
const std::string& dir_path)
const;
86 std::string
basename(
const std::string& filename)
const;
88 std::vector<std::string> read_dir(
const std::string& dir_path)
const;
90 std::string resource_path(
const std::string& identifier =
"\0")
const;
92 std::string user_documents_path()
const;
94 std::string user_app_support_path()
const;
96 std::string user_home_path()
const;
98 std::string system_path()
const;
113 std::string
env(
const std::string&
path)
const;
119 std::unique_ptr<IFile> file;
125extern std::string file_root_;
134std::string file_root();
144void set_file_root(
const std::string& root);
bool is_dir(const std::string &file_path) const
Test for the existence of a directory.
int32 size(const std::string &file_path) const
Re-implements nom::IFile::size.
bool mkdir(const std::string &path) const
std::string env(const std::string &path) const
bool exists(const std::string &file_path) const
Re-implements nom::IFile::exists.
bool mkfile(const std::string &path) const
bool recursive_mkdir(const std::string &path) const
std::string path(const std::string &dir_path) const
Platform-specific implementation of IFile::path.
std::string currentPath() const
Re-implements nom::IFile::currentPath.
nom::size_type num_files(const std::string &path) const
std::string basename(const std::string &filename) const
Re-implements nom::IFile::basename.
std::string extension(const std::string &file) const
Re-implements nom::IFile::extension.
bool set_path(const std::string &path) const
Re-implements nom::IFile::set_path.
bool rmdir(const std::string &path) const
Abstract interface class for Platform-agnostic file access.