Get File Info • AI Agent SDK

get_file_info: Get file information (hash, mtime, size).

get_file_info

Method

</div>

This is a method of the FileTracker class in the indexing module.

Get file information (hash, mtime, size).

Signature

python
def get_file_info(filepath: str) -> Dict[str, Any]

Parameters

ParamField str

Path to file

Returns

ResponseField Dict[str, Any]

Dict with path, hash, mtime, size

Uses

  • os.stat
  • hexdigest
  • hashlib.sha256
  • f.read

Used By

Source

View on GitHub

praisonaiagents/knowledge/indexing.py at line 338