|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
What a stat and a directory entry both answer: the facts about one file, and no name. More...
#include <mnt.h>
Public Attributes | |
| proto_bool | is_dir |
| uint64_t | size |
| 0 for a directory | |
| uint32_t | mtime |
| unix epoch seconds, 0 if the backend keeps no timestamp | |
What a stat and a directory entry both answer: the facts about one file, and no name.
The name is deliberately absent. A name buffer welded into this struct would set one length for every consumer, and the consumers do not agree: the SFTP codec sizes its entry scratch from what one NAME response must hold, WebDAV from an href, the RAM backend from its own file table. Each translation unit derives the length it needs and passes a buffer, so this type stays the four facts and carries no policy.
Stat and readdir share it because they answer the same question about the same directory record
| proto_bool protocore_mnt_stat::is_dir |
| uint32_t protocore_mnt_stat::mtime |