|
NetBurner 3.5.6
PDF Version |
The Standard Embedded Flash File System, EFFS-STD
#include< fsf.h>
More...
Topics | |
| STD File System Seek Codes | |
Macros | |
| #define | fs_getfreespace(drivenum, space) fsm_getfreespace(drivenum, space) |
| Provides information about the drive space usage. | |
| #define | fs_mkdir(dirname) fsm_mkdir(dirname) |
| Makes a new directory. | |
| #define | fs_chdir(dirname) fsm_chdir(dirname) |
| Change the directory. | |
| #define | fs_rmdir(dirname) fsm_rmdir(dirname) |
| Removes a directory. | |
| #define | fs_delete(filename) fsm_delete(filename) |
| Deletes a file. | |
| #define | fs_findfirst(filename, find) fsm_findfirst(filename, find) |
| Find the first file or subdirectory in a specified directory. | |
| #define | fs_findnext(find) fsm_findnext(find) |
Finds the next file or subdirectory in a specified directory after a previous call to fs_findfirst() or fs_findnext(). | |
| #define | fs_open(filename, mode) fsm_open(filename, mode) |
| Opens a file in the file system. | |
| #define | fs_close(filehandle) fsm_close(filehandle) |
| Closes an opened file. | |
| #define | fs_write(buf, size, size_st, filehandle) fsm_write(buf, size, size_st, filehandle) |
| Write data to the file at the current position. | |
| #define | fs_read(buf, size, size_st, filehandle) fsm_read(buf, size, size_st, filehandle) |
| Read data from the current position in a file. | |
| #define | fs_seek(filehandle, offset, whence) fsm_seek(filehandle, offset, whence) |
| Move the stream position of an open file. | |
| #define | fs_eof(filehandle) fsm_eof(filehandle) |
| Check whether the current position in the open target file is the end of the file. | |
| #define | fs_rewind(filehandle) fsm_rewind(filehandle) |
| Sets the file position in the open target file to the start of the file. | |
| #define | fs_settimedate(filename, ctime, cdate) fsm_settimedate(filename, ctime, cdate) |
| Set the time and date of a file or directory. | |
| #define | fs_gettimedate(filename, pctime, pcdate) fsm_gettimedate(filename, pctime, pcdate) |
| Get the time and date of a file or directory. | |
The Standard Embedded Flash File System, EFFS-STD
#include< fsf.h>
| #define fs_chdir | ( | dirname | ) | fsm_chdir(dirname) |
#include <fsf.h>
Change the directory.
| dirname | The directory to change to. |
| FS_NOERR | If able to change to the directory |
| !FS_NOERR | If unable to change to the directory |
| #define fs_close | ( | filehandle | ) | fsm_close(filehandle) |
#include <fsf.h>
Closes an opened file.
| filehandle | A handle to the file to close. |
| FS_NOERR | If able to close the file |
| !FS_NOERR | If unable to close the file |
| #define fs_delete | ( | filename | ) | fsm_delete(filename) |
#include <fsf.h>
Deletes a file.
A read-only or open file cannot be deleted.
| filename | The name of the file to be deleted. |
| FS_NOERR | If able to delete the file |
| !FS_NOERR | If unable to delete the file |
| #define fs_eof | ( | filehandle | ) | fsm_eof(filehandle) |
#include <fsf.h>
Check whether the current position in the open target file is the end of the file.
| filehandle | A handle to the file to check. |
| 0 | Nothing at the end of the file |
| !0 | The end of the file, or an error |
| #define fs_findfirst | ( | filename, | |
| find ) fsm_findfirst(filename, find) |
#include <fsf.h>
Find the first file or subdirectory in a specified directory.
Note: If this is called with "*.*" and this is not the root directory, the first entry found will be ".", which is the current directory.
| filename | The name of the file to find. |
| find | Where to store the found information. |
| FS_NOERR | If the file was found |
| !FS_NOERR | If the file wasn't found or there are errors |
| #define fs_findnext | ( | find | ) | fsm_findnext(find) |
#include <fsf.h>
Finds the next file or subdirectory in a specified directory after a previous call to fs_findfirst() or fs_findnext().
Note: If this is called with "*.*" and this is not the root directory, the first entry found will be ".", which is the current directory.
| find | Where to store the found information. |
| FS_NOERR | If the file was found |
| !FS_NOERR | If the file wasn't found or there are errors |
| #define fs_getfreespace | ( | drivenum, | |
| space ) fsm_getfreespace(drivenum, space) |
#include <fsf.h>
Provides information about the drive space usage.
| drivenum | The drive number to get space usage for. |
| space | The structure to store the usage information in. |
| FS_NOERR | If able to get the drive space usage |
| !FS_NOERR | If unable to get the drive space usage |
| #define fs_gettimedate | ( | filename, | |
| pctime, | |||
| pcdate ) fsm_gettimedate(filename, pctime, pcdate) |
#include <fsf.h>
Get the time and date of a file or directory.
| filename | The name of the file or directory to modify. |
| pctime | A pointer to store the creation time of the file or directory. |
| pcdate | A pointer to store the creation date of the file or directory. |
| FS_NOERR | If able to get time and date |
| !FS_NOERR | If unable to get time and date |
| #define fs_mkdir | ( | dirname | ) | fsm_mkdir(dirname) |
#include <fsf.h>
Makes a new directory.
| dirname | The name to use for the new directory. |
| FS_NOERR | If able to make the directory |
| !FS_NOERR | If unable to make the directory |
| #define fs_open | ( | filename, | |
| mode ) fsm_open(filename, mode) |
#include <fsf.h>
Opens a file in the file system.
| filename | The name of the file to open. |
| mode | The mode to open the file in. The following options are available:
|
| FS_FILE* | Pointer to the file if it could be opened |
| 0 | If it a file could not be opened |
| #define fs_read | ( | buf, | |
| size, | |||
| size_st, | |||
| filehandle ) fsm_read(buf, size, size_st, filehandle) |
#include <fsf.h>
Read data from the current position in a file.
| buf | A pointer where the data should be read. |
| size | The size of the items to be read. |
| size_st | The number of items to be read. |
| filehandle | A handle to the file to read to. |
| #define fs_rewind | ( | filehandle | ) | fsm_rewind(filehandle) |
#include <fsf.h>
Sets the file position in the open target file to the start of the file.
| filehandle | A handle to the file operate on. |
| FS_NOERR | If successful |
| !FS_NOERR | If there was an error |
| #define fs_rmdir | ( | dirname | ) | fsm_rmdir(dirname) |
#include <fsf.h>
Removes a directory.
Note: The target directory must be empty, otherwise an error code is returned.
| dirname | The name of the directory to remove. |
| FS_NOERR | If able to get the drive space usage |
| !FS_NOERR | If unable to get the drive space usage |
| #define fs_seek | ( | filehandle, | |
| offset, | |||
| whence ) fsm_seek(filehandle, offset, whence) |
#include <fsf.h>
Move the stream position of an open file.
| filehandle | A handle to the file to move the position of. |
| offset | The relative byte position according to whence. |
| whence | Where to calculate the offset from. Can be a value from fSeekCodeGroup. |
| FS_NOERR | If the seek operation was successful |
| !FS_NOERR | If there was an error |
| #define fs_settimedate | ( | filename, | |
| ctime, | |||
| cdate ) fsm_settimedate(filename, ctime, cdate) |
#include <fsf.h>
Set the time and date of a file or directory.
| filename | The name of the file or directory to modify. |
| ctime | The creation time of the file or directory. |
| cdate | The creation date of the file or directory. |
| FS_NOERR | If able to set time and date |
| !FS_NOERR | If unable to set time and date |
| #define fs_write | ( | buf, | |
| size, | |||
| size_st, | |||
| filehandle ) fsm_write(buf, size, size_st, filehandle) |
#include <fsf.h>
Write data to the file at the current position.
| buf | A pointer to the data to write. |
| size | The size of the items to write. |
| size_st | The number of items to write. |
| filehandle | A handle to the file to write to. |