weave-locus · entry
Source declarations, signatures and documentation for entry.
Reviewed implementation boundary: Rollback records a marker; mount descriptions and governance metadata alone do not execute mounting or enforce signature authorization. Operations can have separate metadata/blob failure points. See /libraries/locus/overview.
Source: sigil/weave/models/locus/src/entry.rs. SHA-256: 4072d2610e69035c7f879b1c06e6f6e85489c4a1ddfef7e653e17f609348e6c2.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
entry::BlobId
Blob identifier
pub type BlobId = [u8; 32];Source line: 8.
entry::EntryType
Entry type (file, directory, symlink)
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum EntryType {
/// Regular file
File,
/// Directory
Directory,
/// Symbolic link
Symlink,
}Source line: 12.
entry::FileMetadata
File metadata
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FileMetadata {
/// Entry ID
pub id: Uuid,
/// Entry type
pub entry_type: EntryType,
/// Size in bytes (0 for directories)
pub size: u64,
/// Permissions mode
pub mode: u32,
/// Creation time
pub created: SystemTime,
/// Modified time
pub modified: SystemTime,
/// Accessed time
pub accessed: SystemTime,
/// Blob ID for file content (None for directories)
pub blob_id: Option<BlobId>,
/// Target path for symlinks
pub symlink_target: Option<String>,
/// Version number
pub version: u64,
/// Extended attributes
pub xattrs: Option<serde_json::Value>
}Source line: 23.
entry::FileMetadata::new_file
Create metadata for a new file
pub fn new_file(size: u64, mode: u32, blob_id: BlobId) -> Self;Source line: 60.
entry::FileMetadata::new_directory
Create metadata for a new directory
pub fn new_directory(mode: u32) -> Self;Source line: 78.
entry::FileMetadata::new_symlink
Create metadata for a new symlink
pub fn new_symlink(target: String, mode: u32) -> Self;Source line: 96.
entry::FileMetadata::is_file
Check if this is a file
pub fn is_file(&self) -> bool;Source line: 114.
entry::FileMetadata::is_directory
Check if this is a directory
pub fn is_directory(&self) -> bool;Source line: 119.
entry::FileMetadata::is_symlink
Check if this is a symlink
pub fn is_symlink(&self) -> bool;Source line: 124.
entry::FileEntry
A file system entry
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FileEntry {
/// Entry ID
pub id: Uuid,
/// Parent directory ID
pub parent_id: Option<Uuid>,
/// Entry name
pub name: String,
/// Full path
pub path: String,
/// Metadata
pub metadata: FileMetadata
}Source line: 131.
entry::FileEntry::new
Create a new file entry
pub fn new(
parent_id: Option<Uuid>,
name: String,
path: String,
metadata: FileMetadata,
) -> Self;Source line: 150.
entry::FileEntry::entry_type
Get the entry type
pub fn entry_type(&self) -> EntryType;Source line: 166.
entry::FileEntry::is_root
Check if this is the root directory
pub fn is_root(&self) -> bool;Source line: 171.