MCPcopy Create free account
hub / github.com/tensorflow/tfjs / list_dir

Function list_dir

tfjs-converter/python/tensorflowjs/resource_loader.py:40–53  ·  view source on GitHub ↗

List the files inside a dir where path is relative to tensorflowjs/. Args: path: a string path to a resource directory relative to tensorflowjs/. Returns: A list of files inside that directory. Raises: IOError: If the path is not found, or the resource can't be read.

(path)

Source from the content-addressed store, hash-verified

38
39
40def list_dir(path):
41 """List the files inside a dir where path is relative to tensorflowjs/.
42
43 Args:
44 path: a string path to a resource directory relative to tensorflowjs/.
45
46 Returns:
47 A list of files inside that directory.
48
49 Raises:
50 IOError: If the path is not found, or the resource can't be read.
51 """
52 path = os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
53 return os.listdir(path)

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…