# os.path.exists ()

### os.path.exists ( *path* )

Возвращает `True`, если путь относится к существующему пути или дескриптору открытого файла. Возвращает `False` для неработающих символических ссылок. На некоторых платформах эта функция может вернуть `False`, если не предоставлено разрешение на выполнение [os.stat ()](/python-docs/moduli-standartnoi-biblioteki-1/obshie-sluzhby-operacionnoi-sistemy/os/faily-i-direktorii/os.stat.md) в запрошенном файле, даже если путь физически существует.

*Изменено в версии 3.3:* теперь путь может быть целым числом: `True` возвращается, если это дескриптор открытого файла, в противном случае - `False`.

*Изменено в версии 3.6:* Принимает объект, подобный пути (*path-like object*).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/dostup-k-failam-i-papkam/os.path/os.path.exists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
