Skip to main content

Module sidecar

Module sidecar 

Source
Expand description

xattr/sidecar metadata – SyncSignature, dirty flags, JSON fallback. Xattr/sidecar metadata – SyncSignature, MerkleSignature, dir_hash.

Metadata/dirty-flag management via xattr (primary) with JSON sidecar fallback.

Structs§

AsyncSidecar
Background thread for non-blocking dirty flag I/O
SyncSignature
File sync signature stored in xattr/sidecar for change detection

Constants§

XATTR_EMBEDDING
xattr key for embedding metadata (model, dimensions, chunk count).
XATTR_ENRICHMENT
xattr key for LLM enrichment data (Dublin Core, APP envelope).
XATTR_FILE_SIMILARITY
xattr key for file-level similarity fingerprint.
XATTR_MEDIA_META
xattr key for extracted media metadata (EXIF, ID3, PDF info).
XATTR_SIMILARITY
xattr key for similarity metadata (SimHash, entropy class).

Functions§

clear_dir_hash
Clear a stored directory hash (invalidation).
get_dir_hash
Retrieve a stored directory hash from xattr.
get_merkle_signature
Retrieve a stored Merkle signature from xattr or per-target index
get_metadata
Retrieve a metadata value by key from xattr or sidecar fallback
get_sidecar_path
Compute the .foxing_meta sidecar path for a given file
get_sync_signature
Retrieve the stored sync signature for a file
is_dirty
Check if a file has the dirty flag set (indicates an in-progress copy)
remove_metadata
Remove a metadata key from both xattr namespaces and sidecar
set_dir_hash
Store a directory-level Merkle hash via xattr on the target directory.
set_dirty_flag
Set or clear the dirty flag on a file
set_merkle_signature
Store a Merkle signature in xattr (small files) or per-target index (large files)
set_metadata
Store a metadata key-value pair via xattr (primary) or JSON sidecar (fallback)
set_metadata_batch
Write multiple metadata keys. Uses xattr per-key (kernel can’t batch), but avoids sidecar entirely unless xattr is unsupported.
set_sync_signature
Store a sync signature in the file’s xattr/sidecar metadata