29 #include "nomlib/system/unix/UnixFile.hpp"
33 UnixFile::UnixFile (
void ) {}
35 UnixFile::~UnixFile (
void ) {}
41 if ( file.find_last_of (
"." ) != std::string::npos )
42 extension = file.substr ( file.find_last_of (
".") + 1 );
52 if ( ! stat ( file_path.c_str(), &file ) )
64 if ( stat ( file_path.c_str(), &file ) != 0 || !S_ISREG ( file.st_mode ))
79 std::strcpy ( path, dir_path.c_str() );
81 return dirname ( path );
88 if ( getcwd ( path, PATH_MAX ) ==
nullptr )
90 NOM_LOG_ERR ( NOM,
"Unknown error on attempt to obtain current working directory." );
94 std::string cwd ( path );
101 if ( chdir ( path.c_str() ) != 0 )
103 NOM_LOG_ERR ( NOM,
"Unknown error on attempt to change working directory to: " + path );
const std::string extension(const std::string &file)
int32 size(const std::string &file_path)
const std::string currentPath(void)
bool set_path(const std::string &path)
chdir(2) wrapper
const std::string path(const std::string &dir_path)
bool exists(const std::string &file_path)