Components/IFS/src/include/IFS/FWFS/FileSystem.h
Go to the documentation of this file.
116 int fenumxattr(FileHandle file, AttributeEnumCallback callback, void* buffer, size_t bufsize) override;
128 int fgetextents(FileHandle file, Storage::Partition* part, Extent* list, uint16_t extcount) override;
196 int findChildObject(const FWObjDesc& parent, FWObjDesc& child, const char* name, unsigned namelen);
222 * Used for methods which require write access are read-only unless path corresponds to mounted volume.
#define FWFS_MAX_VOLUMES
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:42
Delegate class, encapsulates a std::function Added constructor template implements lambda callback wh...
Definition: Delegate.h:24
Implementation of firmware filing system using IFS.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:95
file_offset_t lseek(FileHandle file, file_offset_t offset, SeekOrigin origin) override
change file read/write position
FileSystem(Storage::Partition partition)
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:97
int mount() override
Mount file system, performing any required initialisation.
FWObjDesc odRoot
Reference to root directory object.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:249
int rewinddir(DirHandle dir) override
Reset directory read position to start.
int write(FileHandle file, const void *data, size_t size) override
write content to a file at current position and advance cursor
int ftruncate(FileHandle file, file_size_t new_size) override
Truncate (reduce) the size of an open file.
int rename(const char *oldpath, const char *newpath) override
rename a file
String getErrorString(int err) override
get the text for a returned error code
@ mounted
int check() override
Perform a file system consistency check.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:136
BitSet< uint8_t, Flag > flags
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:252
FWVolume volumes[FWFS_MAX_VOLUMES]
Volumes mapped to mountpoints by index.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:247
Storage::Partition partition
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:246
int format() override
format the filing system
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:132
int flush(FileHandle file) override
flush any buffered data to physical media
int setVolume(uint8_t index, IFileSystem *fileSystem) override
int setxattr(const char *path, AttributeTag tag, const void *data, size_t size) override
Set an extended attribute for a file given its path.
ACL rootACL
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:251
int fenumxattr(FileHandle file, AttributeEnumCallback callback, void *buffer, size_t bufsize) override
Enumerate attributes.
int fsetxattr(FileHandle file, AttributeTag tag, const void *data, size_t size) override
Set an extended attribute on an open file.
int fcontrol(FileHandle file, ControlCode code, void *buffer, size_t bufSize) override
int opendir(const char *path, DirHandle &dir) override
open a directory for reading
int eof(FileHandle file) override
determine if current file position is at end of file
int fgetextents(FileHandle file, Storage::Partition *part, Extent *list, uint16_t extcount) override
int read(FileHandle file, void *data, size_t size) override
read content from a file and advance cursor
FWFileDesc fileDescriptors[FWFS_MAX_FDS]
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:248
Object::ID volume
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:250
int getxattr(const char *path, AttributeTag tag, void *buffer, size_t size) override
Get an attribute from a file given its path.
FileHandle open(const char *path, OpenFlags flags) override
open a file (or directory) by path
int fgetxattr(FileHandle file, AttributeTag tag, void *buffer, size_t size) override
Get an extended attribute from an open file.
Definition: Components/IFS/src/include/IFS/FWFS/ArchiveStream.h:28
ControlCode
See IFS::IFileSystem::fcontrol
Definition: Components/IFS/src/include/IFS/Control.h:31
Definition: Access.h:34
FWFS File Descriptor.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:51
FWObjDesc odFile
File object.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:52
FileHandle file
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:62
bool isAllocated() const
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:68
IFileSystem * fileSystem
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:60
void reset()
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:78
uint32_t dataSize
Total size of data.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:55
DirHandle dir
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:63
uint32_t cursor
Current read/write offset within file data.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:56
bool isMountPoint() const
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:73
FWFS Object Descriptor.
Definition: Components/IFS/src/include/IFS/FWFS/Object.h:446
Object obj
The object structure.
Definition: Components/IFS/src/include/IFS/FWFS/Object.h:448
FWFS Volume definition for mount points.
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:87
std::unique_ptr< IFileSystem > fileSystem
Definition: Components/IFS/src/include/IFS/FWFS/FileSystem.h:88
bool isMountPoint() const
Definition: Components/IFS/src/include/IFS/FWFS/Object.h:227
uint8_t typeData
Stored type plus flag.
Definition: Components/IFS/src/include/IFS/FWFS/Object.h:143
uint32_t ID
Object identifier (offset from start of image)
Definition: Components/IFS/src/include/IFS/FWFS/Object.h:148
1.9.1