FileStream class inherits from Stream class.
More...
#include <FileStream.h>
FileStream class inherits from Stream class.
◆ FileStream()
Constructor
- Parameters
-
ptr | - shared pointer to an IFile object |
◆ available()
int FileStream::available |
( |
| ) |
|
|
override |
Check the number of bytes available for reading
- Returns
- the number of bytes available
◆ Close()
void FileStream::Close |
( |
| ) |
|
◆ flush()
void FileStream::flush |
( |
| ) |
|
|
override |
◆ GetLastWrite()
time_t FileStream::GetLastWrite |
( |
| ) |
const |
Get the last write time of the stream
- Returns
- the last write time
◆ GetNextFileName() [1/2]
String FileStream::GetNextFileName |
( |
| ) |
const |
Get the name of the next file in the directory
- Returns
- the name of the next file
◆ GetNextFileName() [2/2]
String FileStream::GetNextFileName |
( |
boolean * | isDir | ) |
const |
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
◆ IsDirectory()
boolean FileStream::IsDirectory |
( |
| ) |
const |
Check if the stream is a directory
- Returns
- true if the stream is a directory, false otherwise
◆ Name()
const char * FileStream::Name |
( |
| ) |
const |
Get the name of the stream
- Returns
- the stream name
◆ OpenNextFile()
Open the next file in the directory
- Parameters
-
mode | - mode to open the file in |
- Returns
- a FileStream object for the opened file
◆ operator bool()
FileStream::operator bool |
( |
| ) |
const |
Check if the stream is valid
- Returns
- true if the stream is valid, false otherwise
◆ Path()
const char * FileStream::Path |
( |
| ) |
const |
Get the path of the stream
- Returns
- the stream path
◆ peek()
Peek at the next byte in the stream
- Returns
- the next byte
◆ Position()
size_t FileStream::Position |
( |
| ) |
const |
Get the current position in the stream
- Returns
- the current position
◆ read()
Read a byte from the stream
- Returns
- the byte read
◆ Read()
size_t FileStream::Read |
( |
uint8_t * | buf, |
|
|
size_t | size ) const |
Read data from the stream
- Parameters
-
buf | - buffer to store the data |
size | - size of the data to read |
- Returns
- the number of bytes read
◆ ReadBytes()
size_t ntdv::FileStream::ReadBytes |
( |
char * | buffer, |
|
|
const size_t | length ) const |
|
inline |
Read data from the stream
- Parameters
-
buffer | - buffer to store the data |
length | - size of the data to read |
- Returns
- the number of bytes read
◆ RewindDirectory()
void FileStream::RewindDirectory |
( |
| ) |
const |
Go to the begining of the directory.
◆ Seek() [1/2]
bool ntdv::FileStream::Seek |
( |
const uint32_t | pos | ) |
const |
|
inline |
Seek to a position in the stream
- Parameters
-
- Returns
- true if successful, false otherwise
◆ Seek() [2/2]
bool FileStream::Seek |
( |
uint32_t | pos, |
|
|
SeekMode | mode ) const |
Set a position in the stream
- Parameters
-
pos | - position to seek to |
mode | - mode of seeking |
- Returns
- true if successful, false otherwise
◆ SeekDir()
boolean FileStream::SeekDir |
( |
long | position | ) |
const |
Seek to a position in the directory
- Parameters
-
position | - position to seek to |
- Returns
- true if successful, false otherwise
◆ SetBufferSize()
bool FileStream::SetBufferSize |
( |
size_t | size | ) |
const |
Set the buffer size for the stream
- Parameters
-
- Returns
- true if successful, false otherwise
◆ Size()
size_t FileStream::Size |
( |
| ) |
const |
Get the size of the stream
- Returns
- the size of the stream
◆ write() [1/2]
size_t FileStream::write |
( |
const uint8_t * | buf, |
|
|
size_t | size ) |
|
override |
Write data to the stream
- Parameters
-
buf | - buffer containing the data |
size | - size of the data |
- Returns
- the number of bytes written
◆ write() [2/2]
size_t FileStream::write |
( |
uint8_t | byte | ) |
|
|
override |
Write a byte to the stream
- Parameters
-
- Returns
- the number of bytes written
◆ _ptr
Shared pointer to an IFile object.
The documentation for this class was generated from the following files: