(fn, mode)
| 413 | # Additionally check that `file` is not a directory, as on Windows |
| 414 | # directories pass the os.access check. |
| 415 | def _access_check(fn, mode): |
| 416 | return (os.path.exists(fn) and os.access(fn, mode) and |
| 417 | not os.path.isdir(fn)) |
| 418 | |
| 419 | # Short circuit. If we're given a full path which matches the mode |
| 420 | # and it exists, we're done here. |