MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / file_exists_v2

Function file_exists_v2

tensorflow/python/lib/io/file_io.py:266–283  ·  view source on GitHub ↗

Determines whether a path exists or not. Args: path: string, a path Returns: True if the path exists, whether it's a file or a directory. False if the path does not exist and there are no filesystem errors. Raises: errors.OpError: Propagates any errors reported by the FileSy

(path)

Source from the content-addressed store, hash-verified

264
265@tf_export("io.gfile.exists")
266def file_exists_v2(path):
267 """Determines whether a path exists or not.
268
269 Args:
270 path: string, a path
271
272 Returns:
273 True if the path exists, whether it's a file or a directory.
274 False if the path does not exist and there are no filesystem errors.
275
276 Raises:
277 errors.OpError: Propagates any errors reported by the FileSystem API.
278 """
279 try:
280 pywrap_tensorflow.FileExists(compat.as_bytes(path))
281 except errors.NotFoundError:
282 return False
283 return True
284
285
286@tf_export(v1=["gfile.Remove"])

Callers 1

file_existsFunction · 0.85

Calls 1

FileExistsMethod · 0.45

Tested by

no test coverage detected