Interface for a file.
More...
#include <IFile.h>
◆ ~IFile()
virtual ntdv::IFile::~IFile |
( |
| ) |
|
|
virtualdefault |
◆ Close()
virtual void ntdv::IFile::Close |
( |
| ) |
|
|
pure virtual |
◆ Flush()
virtual void ntdv::IFile::Flush |
( |
| ) |
|
|
pure virtual |
◆ GetLastWrite()
virtual time_t ntdv::IFile::GetLastWrite |
( |
| ) |
|
|
pure virtual |
Get the last write time of the file
- Returns
- the last write time
Implemented in ntdv::VirtualFile.
◆ GetNextFileName() [1/2]
virtual String ntdv::IFile::GetNextFileName |
( |
| ) |
|
|
pure virtual |
Get the name of the next file in the directory
- Returns
- the name of the next file
Implemented in ntdv::VirtualFile.
◆ GetNextFileName() [2/2]
virtual String ntdv::IFile::GetNextFileName |
( |
bool * | isDir | ) |
|
|
pure virtual |
Get the name of the next file in the directory and whether it is a directory
- Parameters
-
isDir | - pointer to a boolean to store whether the file is a directory |
- Returns
- the name of the next file
Implemented in ntdv::VirtualFile.
◆ IsDirectory()
virtual boolean ntdv::IFile::IsDirectory |
( |
| ) |
|
|
pure virtual |
Check if the file is a directory
- Returns
- true if the file is a directory, false otherwise
Implemented in ntdv::VirtualFile.
◆ Name()
virtual const char * ntdv::IFile::Name |
( |
| ) |
const |
|
pure virtual |
◆ OpenNextFile()
virtual FilePtr ntdv::IFile::OpenNextFile |
( |
const char * | mode | ) |
|
|
pure virtual |
Open the next file in the directory
- Parameters
-
mode | - mode to open the file in |
- Returns
- a shared pointer to the opened file
Implemented in ntdv::VirtualFile.
◆ operator bool()
virtual ntdv::IFile::operator bool |
( |
| ) |
|
|
pure virtual |
Check if the file is valid
- Returns
- true if the file is valid, false otherwise
Implemented in ntdv::VirtualFile.
◆ Path()
virtual const char * ntdv::IFile::Path |
( |
| ) |
const |
|
pure virtual |
◆ Position()
virtual size_t ntdv::IFile::Position |
( |
| ) |
const |
|
pure virtual |
Get the current position in the file
- Returns
- the current position
Implemented in ntdv::VirtualFile.
◆ Read()
virtual size_t ntdv::IFile::Read |
( |
uint8_t * | buf, |
|
|
size_t | size ) |
|
pure virtual |
Read data from the file
- Parameters
-
buf | - buffer to store the data |
size | - size of the data to read |
- Returns
- the number of bytes read
Implemented in ntdv::VirtualFile.
◆ RewindDirectory()
virtual void ntdv::IFile::RewindDirectory |
( |
| ) |
|
|
pure virtual |
◆ Seek()
virtual bool ntdv::IFile::Seek |
( |
uint32_t | pos, |
|
|
SeekMode | mode ) |
|
pure virtual |
Set a position in the file
- Parameters
-
pos | - position to seek to |
mode | - mode of seeking |
- Returns
- true if successful, false otherwise
Implemented in ntdv::VirtualFile.
◆ SeekDir()
virtual boolean ntdv::IFile::SeekDir |
( |
long | position | ) |
|
|
pure virtual |
Seek to a position in the directory
- Parameters
-
position | - position to seek to |
- Returns
- true if successful, false otherwise
Implemented in ntdv::VirtualFile.
◆ SetBufferSize()
virtual bool ntdv::IFile::SetBufferSize |
( |
size_t | size | ) |
|
|
pure virtual |
Set the buffer size for the file
- Parameters
-
- Returns
- true if successful, false otherwise
Implemented in ntdv::VirtualFile.
◆ Size()
virtual size_t ntdv::IFile::Size |
( |
| ) |
const |
|
pure virtual |
Get the size of the file
- Returns
- the size of the file
Implemented in ntdv::VirtualFile.
◆ Write()
virtual size_t ntdv::IFile::Write |
( |
const uint8_t * | buf, |
|
|
size_t | size ) |
|
pure virtual |
Write data to the file
- Parameters
-
buf | - buffer containing the data |
size | - size of the data |
- Returns
- the number of bytes written
Implemented in ntdv::VirtualFile.
The documentation for this class was generated from the following file: