|
| int | pfs_open (const char *name, uint8_t op_flags, uint8_t file_type, size_t start_size) |
| | Open a file.
|
| |
| int | pfs_write (int fd, const void *buf, size_t size) |
| | Write at the current position, then advance it.
|
| |
| int | pfs_read (int fd, void *buf, size_t size) |
| | Read from the current position, then advance it.
|
| |
| int | pfs_seek (int fd, int offset, FSeekType seek_type) |
| | Set the current position.
|
| |
| status_t | pfs_close (int fd) |
| | Close a file.
|
| |
| status_t | pfs_close_and_remove (int fd) |
| | Close and remove a file.
|
| |
| status_t | pfs_remove (const char *name) |
| | Remove a file.
|
| |
| size_t | pfs_get_file_size (int fd) |
| | Get the size of a file, that is the number of bytes that can be read.
|
| |
| status_t | pfs_init (bool run_filesystem_check) |
| | Initialize PFS, before any other use.
|
| |
| void | pfs_reboot_cleanup (void) |
| | Clean up after a reboot, once and before any file operation.
|
| |
| void | pfs_format (bool write_erase_headers) |
| | Erase the whole filesystem and drop all open file descriptors.
|
| |
| uint32_t | pfs_get_size (void) |
| | Get the size of the filesystem.
|
| |
| void | pfs_set_size (uint32_t new_size, bool new_region_erased) |
| | Set the size of the filesystem, as regions are added to it.
|
| |
| bool | pfs_active (void) |
| | Check whether PFS is active on this device.
|
| |
| bool | pfs_active_in_region (uint32_t start_address, uint32_t ending_address) |
| | Check whether PFS is active in a range of the filesystem space.
|
| |
| int | pfs_sector_optimal_size (int min_size, int namelen) |
| | Get the optimal size of a file that can use space beyond a minimum.
|
| |
| uint32_t | get_available_pfs_space (void) |
| | Get the space available for new files.
|
| |
| PFSCallbackHandle | pfs_watch_file (const char *filename, PFSFileChangedCallback callback, uint8_t event_flags, void *data) |
| | Watch a file for changes.
|
| |
| void | pfs_unwatch_file (PFSCallbackHandle cb_handle) |
| | Stop watching a file.
|
| |
| uint32_t | pfs_crc_calculate_file (int fd, uint32_t offset, uint32_t num_bytes) |
| | Compute the legacy CRC-32 of a part of a file.
|
| |
| PFSFileListEntry * | pfs_create_file_list (PFSFilenameTestCallback callback) |
| | List the files whose name matches a filter.
|
| |
| void | pfs_delete_file_list (PFSFileListEntry *list) |
| | Free a list returned by pfs_create_file_list().
|
| |
| void | pfs_remove_files (PFSFilenameTestCallback callback) |
| | Remove all files whose name matches a filter.
|
| |