# tf.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/v1.15.0/tensorflow/python/platform/resource_loader.py#L100-L117) |

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

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.resource_loader.get_path_to_datafile`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/resource_loader/get_path_to_datafile)

<br />

    tf.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 />