Pelokalan
Python ID
id en
Masuk
Proyek
library__pathlib.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Exceptions
Pengecualian
The methods given above now return ``False`` instead of raising any :exc:`OSError` exception from the operating system. In previous versions, some kinds of :exc:`OSError` exception are raised, and others suppressed. The new behaviour is consistent with :func:`os.path.exists`, :func:`os.path.isdir`, etc. Use :meth:`~Path.stat` to retrieve the file status without suppressing exceptions.
Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission.
Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. In previous versions, such exceptions are suppressed in many cases, but not all.
If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored (same behavior as the POSIX ``rm -f`` command).