Class FileInfo
java.lang.Object
uno.anahata.ai.tools.spi.pojos.FileInfo
- All Implemented Interfaces:
StatefulResource
A POJO that encapsulates file content and metadata for context-aware operations.
This class implements StatefulResource, allowing it to be tracked
by the ResourceTracker to maintain
an accurate view of the local file system within the conversation context.
- Author:
- AI
-
Constructor Details
-
FileInfo
Constructs a FileInfo object by reading the file at the specified path.- Parameters:
path- The absolute path to the file.- Throws:
IOException- if the file cannot be read.
-
-
Method Details
-
toString
-
getResourceId
Description copied from interface:StatefulResourceGets the unique identifier for this resource.For files, this is typically the absolute path. For other resources, it could be a URL, a database ID, or any other unique string.
- Specified by:
getResourceIdin interfaceStatefulResource- Returns:
- The unique, non-null identifier for the resource.
-
