FATFS file inode.
More...
#include </home/travis/build/forGGe/theCore/lib/fs/fat/export/ecl/fat/file_inode.hpp>
◆ type
◆ file_inode()
file_inode::file_inode |
( |
FATFS * |
fs, |
|
|
const allocator & |
alloc, |
|
|
const char * |
path, |
|
|
const char * |
name |
|
) |
| |
Constructs FATFS inode for given file.
- Parameters
-
[in] | fs | FATFS filesystem object, |
[in] | alloc | Allocator, used for internal allocations. |
[in] | path | Path to a parent dir. |
[in] | name | Name of a file represented by this inode. |
◆ ~file_inode()
file_inode::~file_inode |
( |
| ) |
|
|
virtual |
◆ get_type()
Gets type of entity, represented by the curent inode.
- Returns
- Type of the entity.
Implements ecl::fs::inode.
◆ open()
Returns the file descriptor, if this inode represents file.
- Precondition
- inode representing file entity.
Meaningless if used on the dir inode.
- Returns
- Pointer to file descriptor.
Reimplemented from ecl::fs::inode.
◆ size()
ecl::err file_inode::size |
( |
size_t & |
sz | ) |
const |
|
overridevirtual |
Returns size of a file or number of entries in the directory.
- Parameters
-
[out] | sz | Parameter to store either file size (if this inode represents a file) or count of etries in the directory (if this inode represents a dir). |
- Returns
- Status of operation.
Implements ecl::fs::inode.
◆ get_name()
ecl::err file_inode::get_name |
( |
char * |
buf, |
|
|
size_t & |
buf_sz |
|
) |
| const |
|
overridevirtual |
Gets a name of an entity.
- Parameters
-
[in] | buf | Buffer to store name to. |
[in,out] | buf_sz | On entry: size of a buffer. On exit: bytes written excluding null character. If truncation occur then it will store amount of bytes that would have been written if enough space had been avaliable. |
- Returns
- Status of operation.
Implements ecl::fs::inode.
The documentation for this class was generated from the following files: