|
#define | VirtualFileWrite(ptr, size, n, f) |
| Writes data to a file.
|
|
#define | VirtualFileRead(ptr, size, n, f) |
| Reads data from a file.
|
|
#define | VirtualFileGetc(f) |
| Reads a single character from a file.
|
|
#define | VirtualFilePutc(caractere, f) |
| Writes a single character to a file.
|
|
#define | VirtualFileGets(str, maxLen, f) |
| Reads a string from a file.
|
|
#define | VirtualFilePuts(s, f) |
| Writes a string to a file.
|
|
#define | VirtualFileSeek(f, offset, whence) |
| Sets the current file position.
|
|
#define | VirtualFileTell(f) |
| Returns the current file pointer position.
|
|
#define | VirtualFileEof(f) |
| Checks if the end of a file has been reached.
|
|
Routines for reading/writing to a virtual file.
◆ VirtualFileWrite
#define VirtualFileWrite |
( |
| ptr, |
|
|
| size, |
|
|
| n, |
|
|
| f ) |
Value:
#define VirtualFileGetSource(vf)
Gets a pointer to the virtual file source associated with a given virtual file.
Definition VirtualFile.h:231
Writes data to a file.
- Parameters
-
ptr | Pointer to the data to write. |
size | Size of each element to write. |
n | Number of elements to write. |
f | Pointer to the virtual file. |
- Returns
- The number of bytes effectively written.
◆ VirtualFileRead
#define VirtualFileRead |
( |
| ptr, |
|
|
| size, |
|
|
| n, |
|
|
| f ) |
Value:
Reads data from a file.
- Parameters
-
ptr | Pointer to the buffer where the data will be stored. |
size | Size of each element to read. |
n | Number of elements to read. |
f | Pointer to the virtual file. |
- Returns
- The number of bytes effectively read.
◆ VirtualFileGetc
#define VirtualFileGetc |
( |
| f | ) |
|
Value:
Reads a single character from a file.
- Parameters
-
f | Pointer to the virtual file. |
- Returns
- The next character (byte) in the file.
◆ VirtualFilePutc
#define VirtualFilePutc |
( |
| caractere, |
|
|
| f ) |
Value:
Writes a single character to a file.
- Parameters
-
caractere | The character to write. |
f | Pointer to the virtual file. |
- Returns
- The character value if successful, -1 otherwise.
◆ VirtualFileGets
#define VirtualFileGets |
( |
| str, |
|
|
| maxLen, |
|
|
| f ) |
Value:
Reads a string from a file.
- Parameters
-
str | Pointer to the buffer where the string will be stored. |
maxLen | Maximum length of the string. |
f | Pointer to the virtual file. |
- Returns
- A pointer to the read string.
◆ VirtualFilePuts
#define VirtualFilePuts |
( |
| s, |
|
|
| f ) |
Value:
Writes a string to a file.
- Parameters
-
s | Pointer to the string to write. |
f | Pointer to the virtual file. |
◆ VirtualFileSeek
#define VirtualFileSeek |
( |
| f, |
|
|
| offset, |
|
|
| whence ) |
Value:
Sets the current file position.
- Parameters
-
f | Pointer to the virtual file. |
offset | Offset from the whence parameter. |
whence | Position to base the offset from (SEEK_SET, SEEK_CUR, SEEK_END). |
◆ VirtualFileTell
#define VirtualFileTell |
( |
| f | ) |
|
Value:
Returns the current file pointer position.
- Parameters
-
f | Pointer to the virtual file. |
- Returns
- The current file position.
◆ VirtualFileEof
#define VirtualFileEof |
( |
| f | ) |
|
Value:
Checks if the end of a file has been reached.
- Parameters
-
f | Pointer to the virtual file. |
- Returns
- 1 if the end of the file is reached, 0 otherwise.