MCPcopy
hub / github.com/huggingface/datasets / ls

Method ls

tests/fixtures/fsspec.py:30–36  ·  view source on GitHub ↗
(self, path, detail=True, *args, **kwargs)

Source from the content-addressed store, hash-verified

28 return self._fs.rmdir(path)
29
30 def ls(self, path, detail=True, *args, **kwargs):
31 path = posixpath.join(self.local_root_dir, self._strip_protocol(path))
32 out = self._fs.ls(path, detail=detail, *args, **kwargs)
33 if detail:
34 return [{**info, "name": info["name"][len(self.local_root_dir) :]} for info in out]
35 else:
36 return [name[len(self.local_root_dir) :] for name in out]
37
38 def info(self, path, *args, **kwargs):
39 path = posixpath.join(self.local_root_dir, self._strip_protocol(path))

Callers

nothing calls this directly

Calls 1

_strip_protocolMethod · 0.95

Tested by

no test coverage detected