> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get File Info • AI Agent SDK

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

# get\_file\_info

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**FileTracker**](../classes/FileTracker) class in the [**indexing**](../modules/indexing) module.

Get file information (hash, mtime, size).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_file_info(filepath: str) -> Dict[str, Any]
```

## Parameters

<ParamField query="filepath" type="str" required={true}>
  Path to file
</ParamField>

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  Dict with path, hash, mtime, size
</ResponseField>

## Uses

* `os.stat`
* `hexdigest`
* `hashlib.sha256`
* `f.read`

## Used By

* [`FileTracker.has_changed`](../functions/FileTracker-has_changed)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/knowledge/indexing.py#L343">
  `praisonaiagents/knowledge/indexing.py` at line 343
</Card>
