Opens the file at given path, where path is relative to tensorflowjs/. Args: path: a string resource path relative to tensorflowjs/. Returns: An open file of that resource. Raises: IOError: If the path is not found, or the resource can't be opened.
(path)
| 22 | |
| 23 | |
| 24 | def open_file(path): |
| 25 | """Opens the file at given path, where path is relative to tensorflowjs/. |
| 26 | |
| 27 | Args: |
| 28 | path: a string resource path relative to tensorflowjs/. |
| 29 | |
| 30 | Returns: |
| 31 | An open file of that resource. |
| 32 | |
| 33 | Raises: |
| 34 | IOError: If the path is not found, or the resource can't be opened. |
| 35 | """ |
| 36 | path = os.path.join(os.path.dirname(os.path.abspath(__file__)), path) |
| 37 | return open(path) |
| 38 | |
| 39 | |
| 40 | def list_dir(path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…