Skip to main content

Module marking

Module marking 

Source
Expand description

Platform-agnostic recovered-deleted marking schema (ADR-0008 v2).

The single source of truth for the values a recovered deleted/orphan entry advertises out-of-band: its status (deleted / orphan) and the four recovered MACB times in ISO-8601 UTC. One logical schema, two physical channels — both render from here, so they can never drift:

  • Unix (macFUSE / Linux): extended attributes user.4n6.status + user.4n6.macb.{modified,accessed,changed,born} — see crate::fusefs’s getxattr / listxattr.
  • Windows (Dokan): NTFS Alternate Data Streams <name>:4n6.status and <name>:4n6.macb, surfaced by find_streams — see [crate::fuse_windows].

The Unix channel splits the four MACB times across four xattrs; the Windows channel carries all four in one :4n6.macb stream as a JSON object. The values (the status word and each ISO-8601 time) are identical byte-for-byte between the channels — that identity is the parity guarantee this module exists to enforce, and it is asserted in the tests below.

Structs§

Macb
The four recovered MACB times as Unix seconds, in canonical M A C B order.
Mark
The out-of-band marking on one recovered deleted/orphan entry: its allocation state plus the recovered MACB times. Both physical channels render from this.

Enums§

MarkStream
One NTFS Alternate Data Stream carrying part of the marking.

Constants§

ADS_STREAMS
The two marking ADS streams a recovered-deleted entry exposes, in order.
UNIX_XATTR_NAMES
The five Unix xattr names on a recovered-deleted entry, in listing order.

Functions§

ads_stream_value
Bytes of one marking ADS stream on a marked entry. The Status stream is the status word; the Macb stream is a JSON object of the four ISO-8601 times.
iso8601_utc
Format Unix seconds as ISO-8601 UTC YYYY-MM-DDTHH:MM:SSZ — the marking value form (colons are legal inside a value, unlike a filename).
status_str
The status word for an allocation state: deleted or orphan.
unix_xattr_value
Value of one Unix xattr on a marked entry, or None when name is outside the schema (the getxattr shell then replies ENODATA).