fluentfs.paths.paths.file_exists

fluentfs.paths.paths.file_exists(path: str) bool

Check whether a (regular) file is present at the given path.

Note that the behaviour of file_exists is different from os.path.isfile since file_exists returns False if path represents a symbol link (unlike os.path.isfile which will return True in this case).

Parameters:

path – The given path.

Returns:

True, if a file is present. False if no file-like object is present at the given path at all or if the path represents a directory.