IFileSystem.h
Go to the documentation of this file.
423 virtual int fenumxattr(FileHandle file, AttributeEnumCallback callback, void* buffer, size_t bufsize) = 0;
453 virtual int fgetextents(FileHandle file, Storage::Partition* part, Extent* list, uint16_t extcount)
Definition: Delegate.h:20
virtual int fsetxattr(FileHandle file, AttributeTag tag, const void *data, size_t size)=0
Set an extended attribute on an open file.
virtual int rewinddir(DirHandle dir)=0
Reset directory read position to start.
virtual String getErrorString(int err)
get the text for a returned error code
Definition: IFileSystem.h:214
XX(_name, _tag, _desc)
virtual int opendir(const char *path, DirHandle &dir)=0
open a directory for reading
virtual int flush(FileHandle file)=0
flush any buffered data to physical media
virtual int setVolume(uint8_t index, IFileSystem *fileSystem)
Set volume for mountpoint.
Definition: IFileSystem.h:225
virtual int getxattr(const char *path, AttributeTag tag, void *buffer, size_t size)=0
Get an attribute from a file given its path.
virtual int check()
Perform a file system consistency check.
Definition: IFileSystem.h:496
virtual int write(FileHandle file, const void *data, size_t size)=0
write content to a file at current position and advance cursor
virtual int fgetxattr(FileHandle file, AttributeTag tag, void *buffer, size_t size)=0
Get an extended attribute from an open file.
virtual int fcontrol(FileHandle file, ControlCode code, void *buffer, size_t bufSize)
Low-level and non-standard file control operations.
Definition: IFileSystem.h:312
XX(_tag, _comment)
virtual ~IFileSystem()
Filing system implementations should dismount and cleanup here.
Definition: IFileSystem.h:183
virtual int mount()=0
Mount file system, performing any required initialisation.
virtual int ftruncate(FileHandle file, file_size_t new_size)=0
Truncate (reduce) the size of an open file.
virtual int read(FileHandle file, void *data, size_t size)=0
read content from a file and advance cursor
virtual file_offset_t lseek(FileHandle file, file_offset_t offset, SeekOrigin origin)=0
change file read/write position
virtual int setxattr(const char *path, AttributeTag tag, const void *data, size_t size)=0
Set an extended attribute for a file given its path.
virtual int fgetextents(FileHandle file, Storage::Partition *part, Extent *list, uint16_t extcount)
Get extents for a file.
Definition: IFileSystem.h:453
virtual int setProfiler(IProfiler *profiler)
Set profiler instance to enable debugging and performance assessment.
Definition: IFileSystem.h:205
virtual int eof(FileHandle file)=0
determine if current file position is at end of file
virtual FileHandle open(const char *path, OpenFlags flags)=0
open a file (or directory) by path
virtual int fenumxattr(FileHandle file, AttributeEnumCallback callback, void *buffer, size_t bufsize)=0
Enumerate attributes.
#define FILE_SYSTEM_ATTR_MAP(XX)
Attribute flags for filing system.
Definition: IFileSystem.h:58
#define FILESYSTEM_TYPE_MAP(XX)
Four-character tag to identify type of filing system.
Definition: IFileSystem.h:44
Definition: DirectoryTemplate.h:37
ControlCode
See IFS::IFileSystem::fcontrol
Definition: Components/IFS/src/include/IFS/Control.h:31
size_t maxPathLength
Maximum length of a full file path.
Definition: IFileSystem.h:126
size_t maxNameLength
Maximum length of a single file name.
Definition: IFileSystem.h:125
volume_size_t volumeSize
Size of volume, in bytes.
Definition: IFileSystem.h:130
Type type
The filing system type identifier.
Definition: IFileSystem.h:123
uint32_t volumeID
Unique identifier for volume.
Definition: IFileSystem.h:128
size_t printTo(Print &p) const
volume_size_t freeSpace
Available space, in bytes.
Definition: IFileSystem.h:131
Filing system information with buffer for name.
Definition: IFileSystem.h:170
int copy(const char *src, uint16_t srclen)
copies text from a source buffer into a name buffer
Definition: NameBuffer.h:95