Check if file exists (synchronous) :param str path: File path to check :returns bool: True if file exists, False otherwise
(self, path: str)
| 525 | return False |
| 526 | |
| 527 | def exists_file(self, path: str): |
| 528 | """ |
| 529 | Check if file exists (synchronous) |
| 530 | :param str path: File path to check |
| 531 | :returns bool: True if file exists, False otherwise |
| 532 | """ |
| 533 | self._ensure_whitelisted_file(path) |
| 534 | try: |
| 535 | import os |
| 536 | return os.path.isfile(path) |
| 537 | except Exception: |
| 538 | return False |
| 539 | |
| 540 | def get_temp_dir(self): |
| 541 | tmp = os.path.realpath(tempfile.gettempdir()) |