Name

exists

Synopsis

exists(path)

Returns True when path names an existing file or directory, otherwise False. In other words, os.path.exists( x ) always returns the same result as os.access( x ,os.F_OK).

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.