Skip to main content

exists_sync

Checks if a file or directory exists at the specified path by retrieving the underlying filesystem and attempting to fetch its metadata.

def exists_sync(path: str, **kwargs) -> bool: ...

Synchronously checks if a file or directory exists at the specified path by querying the underlying filesystem. Use this to verify resource availability before attempting read or write operations.

Parameters​

NameTypeDescription
pathstrThe URI or local file system path to be checked for existence.
**kwargsdictAdditional filesystem-specific arguments passed to the underlying storage provider.

Returns​

TypeDescription
boolTrue if the path exists and is accessible, False if the path is not found.