Extend `pathlib.Path.exists` method to support both local and remote files. Args: download_config : mainly use token or storage_options to support different platforms and auth types. Returns: `bool`
(self, download_config: Optional[DownloadConfig] = None)
| 1103 | return path_as_posix |
| 1104 | |
| 1105 | def exists(self, download_config: Optional[DownloadConfig] = None): |
| 1106 | """Extend `pathlib.Path.exists` method to support both local and remote files. |
| 1107 | |
| 1108 | Args: |
| 1109 | download_config : mainly use token or storage_options to support different platforms and auth types. |
| 1110 | |
| 1111 | Returns: |
| 1112 | `bool` |
| 1113 | """ |
| 1114 | return xexists(str(self), download_config=download_config) |
| 1115 | |
| 1116 | def glob(self, pattern, download_config: Optional[DownloadConfig] = None): |
| 1117 | """Glob function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs. |