Entropic 2.3.8
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_unchanged (const std::string &path, size_t current_hash) const
 Check if a file was read and content unchanged.
 
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
Parameters
pathCanonical file path.
hashContent hash at time of read.

Definition at line 43 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 if previously recorded.

Definition at line 74 of file filesystem.cpp.

◆ was_read_unchanged()

bool entropic::FileAccessTracker::was_read_unchanged ( const std::string &  path,
size_t  current_hash 
) const

Check if a file was read and content unchanged.

Check if file was read and content is unchanged.

Parameters
pathCanonical file path.
current_hashCurrent content hash.
Returns
true if read and unchanged.
Version
1.8.5
Parameters
pathCanonical file path.
current_hashCurrent content hash.
Returns
true if previously read with matching hash.

Definition at line 57 of file filesystem.cpp.


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