Public Member Functions | List of all members
nom::IFile Class Referenceabstract

Abstract interface class for Platform-agnostic file access. More...

#include <IFile.hpp>

Inheritance diagram for nom::IFile:
[legend]

Public Member Functions

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

Detailed Description

Abstract interface class for Platform-agnostic file access.

Definition at line 41 of file IFile.hpp.

Member Function Documentation

virtual const std::string nom::IFile::currentPath ( void  )
pure virtual

getcwd(3) wrapper

Returned path is arbitrarily limited to 1024 characters.

Implemented in nom::UnixFile, and nom::WinFile.

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

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

Implemented in nom::UnixFile, and nom::WinFile.

virtual const std::string nom::IFile::extension ( const std::string &  file)
pure virtual

Returns the file extension of the input file path

Returns a null terminated string on err

Implemented in nom::UnixFile, and nom::WinFile.

virtual const std::string nom::IFile::path ( const std::string &  dir_path)
pure virtual

dirname(3) wrapper

Extract the directory portion of a pathname

dir_path is arbitrarily limited to 1024 characters.

Implemented in nom::UnixFile, and nom::WinFile.

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

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

-1 on err

Implemented in nom::UnixFile, and nom::WinFile.


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