29#ifndef NOMLIB_UNIX_FILE_HEADERS
30#define NOMLIB_UNIX_FILE_HEADERS
39#include "nomlib/config.hpp"
40#include "nomlib/system/IFile.hpp"
47class UnixFile:
public IFile
56 const std::string
extension (
const std::string& file );
61 int32
size (
const std::string& file_path );
66 bool is_dir(
const std::string& file_path );
68 bool is_file(
const std::string& file_path );
73 bool exists(
const std::string& file_path );
84 const std::string
path(
const std::string& dir_path );
99 const std::string
basename (
const std::string& filename );
109 std::vector<std::string>
read_dir(
const std::string& dir_path );
const std::string basename(const std::string &filename)
bool mkfile(const std::string &path)
Create a file (zero bytes).
bool recursive_mkdir(const std::string &path)
Create directories recursively.
bool is_dir(const std::string &file_path)
Test for the existence of a directory.
const std::string resource_path(const std::string &identifier="\0")
Get the path to the Resources folder within a bundle.
const std::string user_app_support_path(void)
Get the path to the logged in user's Application Support folder.
const std::string user_documents_path(void)
Get the path to the logged in user's Documents folder.
std::vector< std::string > read_dir(const std::string &dir_path)
Get a list of file entries within a directory.
const std::string extension(const std::string &file)
const std::string path(const std::string &dir_path)
Extract the directory portion of a pathname.
nom::size_type num_files(const std::string &path)
Get the total number of files in a directory.
bool set_path(const std::string &path)
const std::string user_home_path(void)
Get the current user's home directory path.
const std::string system_path(void)
Get the platform-defined system path.
int32 size(const std::string &file_path)
bool exists(const std::string &file_path)
bool mkdir(const std::string &path)
Create a directory entry.
std::string currentPath(void)
bool rmdir(const std::string &path)
Remove a directory entry.
std::string env(const std::string &path)
Get the value of an environment variable.