MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / glob

Method glob

tensorboard/compat/tensorflow_stub/io/gfile.py:175–191  ·  view source on GitHub ↗

Returns a list of files that match the given pattern(s).

(self, filename)

Source from the content-addressed store, hash-verified

173 f.write(compatify(file_content))
174
175 def glob(self, filename):
176 """Returns a list of files that match the given pattern(s)."""
177 if isinstance(filename, str):
178 return [
179 # Convert the filenames to string from bytes.
180 compat.as_str_any(matching_filename)
181 for matching_filename in py_glob.glob(compat.as_bytes(filename))
182 ]
183 else:
184 return [
185 # Convert the filenames to string from bytes.
186 compat.as_str_any(matching_filename)
187 for single_filename in filename
188 for matching_filename in py_glob.glob(
189 compat.as_bytes(single_filename)
190 )
191 ]
192
193 def isdir(self, dirname):
194 """Returns whether the path is a directory or not."""

Callers

nothing calls this directly

Calls 1

globMethod · 0.45

Tested by

no test coverage detected