(url_or_filename: str)
| 77 | |
| 78 | |
| 79 | def is_local_path(url_or_filename: str) -> bool: |
| 80 | # On unix the scheme of a local path is empty (for both absolute and relative), |
| 81 | # while on windows the scheme is the drive name (ex: "c") for absolute paths. |
| 82 | # for details on the windows behavior, see https://bugs.python.org/issue42215 |
| 83 | return urlparse(url_or_filename).scheme == "" or os.path.ismount(urlparse(url_or_filename).scheme + ":/") |
| 84 | |
| 85 | |
| 86 | def is_relative_path(url_or_filename: str) -> bool: |
no outgoing calls