Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::FileAccessTracker Class Reference

Tracks file read state for read-before-write enforcement. More...

#include <entropic/mcp/servers/filesystem.h>

Public Member Functions

void record_read (const std::string &path, size_t hash)
 Record that a file was read.
 
bool was_read (const std::string &path) const
 Check if a file was ever read.
 

Detailed Description

Tracks file read state for read-before-write enforcement.

Version
1.8.5

Definition at line 30 of file filesystem.h.

Member Function Documentation

◆ record_read()

void entropic::FileAccessTracker::record_read ( const std::string &  path,
size_t  hash 
)

Record that a file was read.

Record that a file was read with its content hash.

Parameters
pathCanonical file path.
hashContent hash at time of read.
Version
1.8.5

The tracker is what makes read-before-write enforceable: the hash stored here is compared at write time to detect external modification.

Parameters
pathCanonical file path.
hashContent hash at time of read. @req REQ-MCP-021
Version
1.8.5

Definition at line 48 of file filesystem.cpp.

◆ was_read()

bool entropic::FileAccessTracker::was_read ( const std::string &  path) const

Check if a file was ever read.

Check if a file was ever read in this session.

Parameters
pathCanonical file path.
Returns
true if previously read.
Version
1.8.5
Parameters
pathCanonical file path.
Returns
true when a read was recorded for this path, regardless of whether the content has since changed. @req REQ-MCP-021
Version
1.8.5

Definition at line 63 of file filesystem.cpp.


The documentation for this class was generated from the following files: