Public Member Functions | List of all members
nom::UnixFile Class Reference

Platform-specific interface for file based access in Unix. More...

#include <UnixFile.hpp>

Inheritance diagram for nom::UnixFile:
[legend]
Collaboration diagram for nom::UnixFile:
[legend]

Public Member Functions

const std::string extension (const std::string &file)
 
int32 size (const std::string &file_path)
 
bool exists (const std::string &file_path)
 
const std::string path (const std::string &dir_path)
 
const std::string currentPath (void)
 
bool set_path (const std::string &path)
 chdir(2) wrapper
 

Detailed Description

Platform-specific interface for file based access in Unix.

Definition at line 53 of file UnixFile.hpp.

Member Function Documentation

const std::string nom::UnixFile::currentPath ( void  )
virtual

getcwd(3) wrapper

Return path is arbitrarily limited to the POSIX standard of 256 characters for maximum cross-platform portability.

Implements nom::IFile.

Definition at line 84 of file UnixFile.cpp.

Here is the call graph for this function:

bool nom::UnixFile::exists ( const std::string &  file_path)
virtual

Uses stat(2) to determine if the input file exists

Implements nom::IFile.

Definition at line 60 of file UnixFile.cpp.

const std::string nom::UnixFile::extension ( const std::string &  file)
virtual

Returns the file extension of the input file path

Returns a null terminated string on err

Implements nom::IFile.

Definition at line 37 of file UnixFile.cpp.

const std::string nom::UnixFile::path ( const std::string &  dir_path)
virtual

dirname(3) wrapper

Extract the directory portion of a pathname

dir_path is arbitrarily limited to the POSIX standard of 256 characters for maximum cross-platform portability.

Implements nom::IFile.

Definition at line 70 of file UnixFile.cpp.

Here is the caller graph for this function:

int32 nom::UnixFile::size ( const std::string &  file_path)
virtual

Uses stat(2) to determine input file size (in bytes)

-1 on err

Implements nom::IFile.

Definition at line 48 of file UnixFile.cpp.


The documentation for this class was generated from the following files: