# tf.compat.v1.gfile.Stat

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/lib/io/file_io.py#L895-L908) |

Returns file statistics for a given path.

    tf.compat.v1.gfile.Stat(
        filename
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `filename` | string, path to a file |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| FileStatistics struct that contains information about the path ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| [`errors.OpError`](https://www.tensorflow.org/api_docs/python/tf/errors/OpError) | If the operation fails. |

<br />