StreamFile class.
More...
#include <ArduinoFiles.h>
template<class BaseFile, typename PosType>
class StreamFile< BaseFile, PosType >
StreamFile class.
template<class BaseFile, typename PosType>
int StreamFile< BaseFile, PosType >::available |
( |
| ) |
|
|
inline |
- Returns
- number of bytes available from the current position to EOF or INT_MAX if more than INT_MAX bytes are available.
template<class BaseFile, typename PosType>
Ensure that any bytes written to the file are saved to the SD card.
template<class BaseFile, typename PosType>
bool StreamFile< BaseFile, PosType >::isDirectory |
( |
| ) |
|
|
inline |
This function reports if the current file is a directory or not.
- Returns
- true if the file is a directory.
template<class BaseFile, typename PosType>
const char* StreamFile< BaseFile, PosType >::name |
( |
| ) |
const |
|
inline |
No longer implemented due to Long File Names.
Use getName(char* name, size_t size).
- Returns
- a pointer to replacement suggestion.
template<class BaseFile, typename PosType>
Opens the next file or folder in a directory.
- Parameters
-
- Returns
- a FatStream object.
template<class BaseFile, typename PosType>
Return the next available byte without consuming it.
- Returns
- The byte if no error and not at eof else -1;
template<class BaseFile, typename PosType>
PosType StreamFile< BaseFile, PosType >::position |
( |
| ) |
|
|
inline |
- Returns
- the current file position.
template<class BaseFile, typename PosType>
Read the next byte from a file.
- Returns
- For success return the next byte in the file as an int. If an error occurs or end of file is reached return -1.
template<class BaseFile, typename PosType>
void StreamFile< BaseFile, PosType >::rewindDirectory |
( |
| ) |
|
|
inline |
Rewind a file if it is a directory
template<class BaseFile, typename PosType>
bool StreamFile< BaseFile, PosType >::seek |
( |
PosType |
pos | ) |
|
|
inline |
Seek to a new position in the file, which must be between 0 and the size of the file (inclusive).
- Parameters
-
[in] | pos | the new file position. |
- Returns
- true for success else false.
template<class BaseFile, typename PosType>
template<class BaseFile, typename PosType>
size_t StreamFile< BaseFile, PosType >::write |
( |
uint8_t |
b | ) |
|
|
inline |
Write a byte to a file. Required by the Arduino Print class.
- Parameters
-
[in] | b | the byte to be written. Use getWriteError to check for errors. |
- Returns
- 1 for success and 0 for failure.
The documentation for this class was generated from the following file:
- ArduinoSdFs/libraries/SdFs/src/common/ArduinoFiles.h