Provides an API to manipulate files.
More...
Go to the source code of this file.
|
FileInfo | files_getInfo (const char *filename) |
| Retrieves information about the file with the given name. More...
|
|
unsigned long | files_readFile (const char *filename, char *contentBuffer, unsigned long bufferSize) |
| Reads the given file. More...
|
|
unsigned long | files_writeFile (const char *filename, const char *contentBuffer, unsigned long bufferSize) |
| Writes the given file. More...
|
|
Provides an API to manipulate files.
◆ files_getInfo()
FileInfo files_getInfo |
( |
const char * |
filename | ) |
|
Retrieves information about the file with the given name.
- Parameters
-
filename | The name of the file to get information of |
- Returns
- the information of the file with the given name
◆ files_readFile()
unsigned long files_readFile |
( |
const char * |
filename, |
|
|
char * |
contentBuffer, |
|
|
unsigned long |
bufferSize |
|
) |
| |
Reads the given file.
An error can occur if :
- the given file is a directory
- the given file is protected against reading
- the given buffer is too small for the specified size
- Parameters
-
filename | The name of the file to read |
contentBuffer | The buffer to store file content in |
bufferSize | The size of the given buffer |
- Returns
- the actually read size or -1 if an error occurred
◆ files_writeFile()
unsigned long files_writeFile |
( |
const char * |
filename, |
|
|
const char * |
contentBuffer, |
|
|
unsigned long |
bufferSize |
|
) |
| |
Writes the given file.
An error can occur if :
- the given file is a directory
- the given file is protected against writing
- the given buffer is too small for the specified size
- Parameters
-
filename | The name of the file to write to |
contentBuffer | The buffer to get file content from |
bufferSize | The size of the given buffer |
- Returns
- the actually written size or -1 if an error occurred