# tf.compat.v1.resource_loader.get_path_to_datafile

<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/platform/resource_loader.py#L99-L126) |

Get the path to the specified file in the data dependencies.

    tf.compat.v1.resource_loader.get_path_to_datafile(
        path
    )

The path is relative to tensorflow/

<br />

<br />

<br />

| ## Args ||
|---|---|
| `path` | a string resource path relative to tensorflow/ |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The path to the specified file present in the data attribute of py_test or py_binary. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `IOError` | If the path is not found, or the resource can't be opened. |

<br />