ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_vfs_stat_t Struct Reference

Metadata returned by ra8_io_vfs_stat. More...

#include <ra8_io_vfs.h>

Collaboration diagram for ra8_io_vfs_stat_t:

Data Fields

uint64_t size_bytes
 File size in bytes (0 for directories).
ra8_fs_timestamp_t created
 Creation time, when present.
ra8_fs_timestamp_t modified
 Last-modified time, when present.
ra8_fs_timestamp_t accessed
 Last-accessed time/date, when present.
uint8_t attr
 The entry's own FAT attribute byte.
bool is_directory
 true => path names a directory.
bool exists
 true => the path resolves to an entry.

Detailed Description

Metadata returned by ra8_io_vfs_stat.

exists is false (with k_ra8_ok) when the path resolves to a mount but the file is absent, so callers can probe without treating a miss as an error.

attr and is_directory are read out of the on-disk directory entry, so a folder reports as a folder. Anything built over this – a file browser, a USB/MTP gateway, an importer – can tell the two apart, which it could not when both fields were hardcoded. Creation, modification, and access timestamps are carried through from the same entry as well.

Invariant
is_directory equals (attr & k_ra8_fs_attr_directory) != 0.
size_bytes is 0 whenever is_directory is true.
Since
0.1.0

Definition at line 96 of file ra8_io_vfs.h.

Field Documentation

◆ accessed

ra8_fs_timestamp_t ra8_io_vfs_stat_t::accessed

Last-accessed time/date, when present.

Definition at line 100 of file ra8_io_vfs.h.

Referenced by internal_stat(), and ra8_io_vfs_stat().

◆ attr

uint8_t ra8_io_vfs_stat_t::attr

The entry's own FAT attribute byte.

Definition at line 101 of file ra8_io_vfs.h.

Referenced by ra8_io_vfs_stat().

◆ created

ra8_fs_timestamp_t ra8_io_vfs_stat_t::created

Creation time, when present.

Definition at line 98 of file ra8_io_vfs.h.

Referenced by internal_stat(), and ra8_io_vfs_stat().

◆ exists

bool ra8_io_vfs_stat_t::exists

◆ is_directory

bool ra8_io_vfs_stat_t::is_directory

◆ modified

ra8_fs_timestamp_t ra8_io_vfs_stat_t::modified

Last-modified time, when present.

Definition at line 99 of file ra8_io_vfs.h.

Referenced by internal_stat(), and ra8_io_vfs_stat().

◆ size_bytes

uint64_t ra8_io_vfs_stat_t::size_bytes

File size in bytes (0 for directories).

Definition at line 97 of file ra8_io_vfs.h.

Referenced by internal_staged_file_check(), internal_stat(), and ra8_io_vfs_stat().


The documentation for this struct was generated from the following file: