IBR-DTNSuite  0.12
io::FATFile Class Reference

#include <FATFile.h>

Inheritance diagram for io::FATFile:
Inheritance graph
Collaboration diagram for io::FATFile:
Collaboration graph

Public Member Functions

 FATFile (const FatImageReader &reader)
 
 FATFile (const FatImageReader &reader, const std::string &file_path)
 
virtual ~FATFile ()
 
int getFiles (std::list< FATFile > &files) const
 
virtual int remove (bool recursive)
 
FATFile get (const std::string &filename) const
 
FATFile getParent () const
 
virtual bool exists () const
 
virtual void update ()
 
virtual size_t size () const
 
virtual time_t lastaccess () const
 
virtual time_t lastmodify () const
 
virtual time_t laststatchange () const
 
const FatImageReadergetReader () const
 
- Public Member Functions inherited from ibrcommon::File
 File ()
 
 File (const std::string &path)
 
virtual ~File ()
 
unsigned char getType () const
 
int getFiles (std::list< File > &files) const
 
bool isRoot () const
 
bool isSystem () const
 
bool isDirectory () const
 
std::string getPath () const
 
std::string getBasename () const
 
File get (const std::string &filename) const
 
File getParent () const
 
bool operator== (const ibrcommon::File &other) const
 
bool operator< (const ibrcommon::File &other) const
 

Additional Inherited Members

- Static Public Member Functions inherited from ibrcommon::File
static void createDirectory (File &path)
 
- Protected Member Functions inherited from ibrcommon::File
 File (const std::string &path, const unsigned char t)
 
- Protected Attributes inherited from ibrcommon::File
unsigned char _type
 

Detailed Description

Definition at line 39 of file FATFile.h.

Constructor & Destructor Documentation

io::FATFile::FATFile ( const FatImageReader reader)

Definition at line 29 of file FATFile.cpp.

Referenced by get(), and getParent().

io::FATFile::FATFile ( const FatImageReader reader,
const std::string &  file_path 
)

Definition at line 34 of file FATFile.cpp.

References update().

Here is the call graph for this function:

io::FATFile::~FATFile ( )
virtual

Definition at line 40 of file FATFile.cpp.

Member Function Documentation

bool io::FATFile::exists ( ) const
virtual

Checks whether this file exists or not.

Returns
True, if the file exists.

Reimplemented from ibrcommon::File.

Definition at line 72 of file FATFile.cpp.

References io::FatImageReader::exists().

Here is the call graph for this function:

FATFile io::FATFile::get ( const std::string &  filename) const

Definition at line 60 of file FATFile.cpp.

References FATFile(), ibrcommon::File::get(), and ibrcommon::File::getPath().

Here is the call graph for this function:

int io::FATFile::getFiles ( std::list< FATFile > &  files) const

Definition at line 44 of file FATFile.cpp.

References io::FatImageReader::FatImageException::getErrorCode(), and io::FatImageReader::list().

Referenced by io::ObservedFile::findFiles().

Here is the call graph for this function:

FATFile io::FATFile::getParent ( ) const

Definition at line 66 of file FATFile.cpp.

References FATFile(), ibrcommon::File::getParent(), and ibrcommon::File::getPath().

Here is the call graph for this function:

const FatImageReader & io::FATFile::getReader ( ) const

Definition at line 106 of file FATFile.cpp.

Referenced by io::TarUtils::write().

time_t io::FATFile::lastaccess ( ) const
virtual

Get the timestamp of the last access

Reimplemented from ibrcommon::File.

Definition at line 91 of file FATFile.cpp.

References io::FatImageReader::lastaccess().

Referenced by lastmodify(), and laststatchange().

Here is the call graph for this function:

time_t io::FATFile::lastmodify ( ) const
virtual

Get the timestamp of the last modification

Reimplemented from ibrcommon::File.

Definition at line 96 of file FATFile.cpp.

References lastaccess().

Here is the call graph for this function:

time_t io::FATFile::laststatchange ( ) const
virtual

Get the timestamp of the last status change

Reimplemented from ibrcommon::File.

Definition at line 101 of file FATFile.cpp.

References lastaccess().

Here is the call graph for this function:

int io::FATFile::remove ( bool  recursive)
virtual

Remove a file.

Parameters
recursiveIf set to true, the deletion works recursive and deletes directories with files too.
Returns
Returns zero on success and an error number on failure.

Reimplemented from ibrcommon::File.

Definition at line 54 of file FATFile.cpp.

size_t io::FATFile::size ( ) const
virtual

Get the size of the file.

Returns
The size in bytes.

Reimplemented from ibrcommon::File.

Definition at line 86 of file FATFile.cpp.

References io::FatImageReader::size().

Here is the call graph for this function:

void io::FATFile::update ( )
virtual

Updates file information like file type

See Also
getType()

Reimplemented from ibrcommon::File.

Definition at line 77 of file FATFile.cpp.

References ibrcommon::File::_type, and io::FatImageReader::isDirectory().

Referenced by FATFile().

Here is the call graph for this function:


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