Data Structures | |
| struct | fsys_time |
| struct | fsys_stat |
| struct | fsys_finddata |
Defines | |
| #define | FS_MAXFILES 10 |
| #define | FS_STANDARD_API 0 |
| #define | FS_SUBDIRECTORIES 1 |
| #define | FS_MAXFNAMELEN 256 |
| #define | FSO_RDWR 0x000 |
| #define | FSO_RDONLY 0x001 |
| #define | FSO_WRONLY 0x002 |
| #define | FSO_CREAT 0x004 |
| #define | FSO_TRUNC 0x008 |
| #define | FSO_SEQUENTIAL 0x000 |
| #define | FSO_RANDOM 0x010 |
| #define | FSO_BINARY 0x000 |
| #define | FSO_TEXT 0x020 |
| #define | FSO_EXCL 0x040 |
| #define | FSO_APPEND 0x080 |
| #define | FSS_IFMT 0x00170000 |
| #define | FSS_IFDIR 0x00040000 |
| #define | FSS_IFCHR 0x00020000 |
| #define | FSS_IFIFO 0x00010000 |
| #define | FSS_IFREG 0x00100000 |
| #define | FSS_IREAD 0x00000400 |
| #define | FSS_IWRITE 0x00000200 |
| #define | FSS_IEXEC 0x00000100 |
| #define | FSA_NORMAL 0x00 |
| #define | FSA_RDONLY 0x01 |
| #define | FSA_HIDDEN 0x02 |
| #define | FSA_SYSTEM 0x04 |
| #define | FSA_SUBDIR 0x08 |
| #define | FSA_ARCH 0x10 |
| #define | FSSEEK_SET 0 |
| #define | FSSEEK_CUR 1 |
| #define | FSSEEK_END 2 |
Functions | |
| sint_t | fsys_open (const char *filename, const sint_t mode) |
| sint_t | fsys_opent (char *filename, const sint_t mode) |
| void | fsys_close (const sint_t file) |
| sint_t | fsys_write (const sint_t file, const char *buf, const sint_t count) |
| sint_t | fsys_read (const sint_t file, const char *buf, const sint_t count) |
| sint_t | fsys_eof (const sint_t file) |
| sint_t | fsys_seek (const sint_t file, const sint_t position, const sint_t origin) |
| sint_t | fsys_tell (const sint_t file) |
| sint_t | fsys_stat (const char *fname, struct fsys_stat *stat) |
| sint_t | fsys_findfirst (char *filespec, struct fsys_finddata *fileinfo) |
| sint_t | fsys_findnext (sint_t handle, struct fsys_finddata *fileinfo) |
| sint_t | fsys_findclose (sint_t handle) |
| sint_t | fsys_remove (const char *filename) |
| sint_t | fsys_rename (const char *from, const char *to) |
| sint_t | fsys_replace (const char *oldfile, const char *newfile) |
| sint_t | fsys_mkdir (const char *pathname) |
| sint_t | fsys_rmdir (const char *pathname) |
| sint_t | fsys_buildPathName (char *outbuf, const char *pathname, const char *filename) |
| sint_t | fsys_format (u32_t blocksize, u32_t maxFilenameLength) |
| u32_t | fsys_free (void) |
| u32_t | fsys_shrinkImage (void *image) |
| sint_t | fsys_addDriveImage (void *img, sint_t readonly) |
| sint_t | fsys_init (u32_t size, u32_t blocksize, u32_t maxFilenameLength) |
| sint_t | fsys_term (void) |
| void * | fsys_lockAndGetImage (u32_t *size) |
| void | fsys_unlockImage (void) |
|
|
Set the maximum number of simultanousely opened files. Default is 10. |
|
|
Maximum length of a filename |
|
|
Set this define to 1 to enable standard I/O function names for open/close/read/write etc. |
|
|
Enable support for 'virtual' subdiretories when set to 1. The filesystem API will be extendet by some subdirectory functions. |
|
|
archive file |
|
|
hidden file |
|
|
normal file - No read/write restrictions |
|
|
read only file |
|
|
subdirectory |
|
|
system file |
|
|
writes are done at end of file |
|
|
file mode is binary (untranslated) |
|
|
create new file and open it |
|
|
open only if file doesn't already exist |
|
|
file access is primarily random |
|
|
open for reading only |
|
|
open for reading and writing |
|
|
file access is primarily sequential |
|
|
file mode is text (translated) |
|
|
open and truncate file to zero length |
|
|
open for writing only |
|
|
execute/search permission, owner |
|
|
character special |
|
|
directory |
|
|
pipe |
|
|
file type mask |
|
|
regular |
|
|
read permission, owner |
|
|
write permission, owner |
|
|
seek starts from current position |
|
|
seek starts from end of file |
|
|
seek starts at beginning of file |
|
||||||||||||
|
Add an filesystem image to the filesystem. The image can be marked as readonly when the image resides in a non writable (Flash-) ROM.
|
|
||||||||||||||||
|
Build a valid path string from pathname and filename.
|
|
|
Close a file again. This function is equivalent to the one from the runtime library.
|
|
|
Tests if the file pointer has reached the end of the file.
|
|
|
Closes the handle that was returned by fsys_findfirst. This function is equivalent to the one from the runtime library.
|
|
||||||||||||
|
Find the first file on the drive. This function is equivalent to the one from the runtime library.
|
|
||||||||||||
|
Find the next file on the drive that matches the search mask passed to the function fsys_findfirst. This function is equivalent to the one from the runtime library.
|
|
||||||||||||
|
Formats the RAM-Disk, and erases all data stored in writeable RAM.
|
|
|
Returns the free drive space in bytes.
|
|
||||||||||||||||
|
Initialize the file system. This function must be called before all others.
|
|
|
This function returns a pointer to the RAM based image in memory. The image is locked after this operation, so no file operation will change the image. After processing the image, the function fsys_unlockImage must be called.
|
|
|
Make a new subdirectory.
|
|
||||||||||||
|
Open a file for read or write access. This function is equivalent to the one from the runtime library.
|
|
||||||||||||
|
Create and open a temporary file. Sometimes it is useful to create a temporary file to store some data for a short time. This function automatically generates an unique file name, creates an empty file and returns the handle to the file. Note that this function is useful in conjunction with fsys_replace to provide dynamic html pages for a http demon.
|
|
||||||||||||||||
|
Read a block of data from a file. This function is equivalent to the one from the runtime library.
|
|
|
Delete a file from a writeable RAM-Drive.
|
|
||||||||||||
|
Rename a file in a writable RAM-Drive.
|
|
||||||||||||
|
Replace an old file by a new file. This function can be used to replace a file by a new one, while the old one is still in use. This allows the implementation of http servers that use static and dynamic html pages: A client can load the old dynamic page while the new one is just writing to the drive. When the new file is fully written, the old one is replaced by it. Then the data area of the old file is freed as soon as the last file handle referencing the file is closed. Please see also the function fsys_opent which can be used to create a temporary file for the new dynamic html page. In principle, this replace function does no more than 'rename' and 'delete', but with the exception that it can be applyed on files that are currently in use.
|
|
|
Remove an existing but empty subdirectory.
|
|
||||||||||||||||
|
Set the file pointer to a new position. This function is equivalent to the one from the runtime library.
|
|
|
Shrink an image to the smallest possible size (remove all unused blocks from the image). This function is useful when a small, ROM-able image shall be generated. Note that this function works best with an unfragmented image file.
|
|
||||||||||||
|
Get some status information about a file. This function is equivalent to the one from the runtime library.
|
|
|
|
|
|
Terminate the filesystem. All memory allocated by the filesystem will be freed.
|
|
|
Unlock an image that was previously locked by a call to the function fsys_lockAndGetImage().
|
|
||||||||||||||||
|
Write a block of data to a file. This function is equivalent to the one from the runtime library.
|
1.3.9.1