(pathname, dir_fd)
| 212 | |
| 213 | |
| 214 | def _lexists(pathname, dir_fd): |
| 215 | # Same as os.path.lexists(), but with dir_fd |
| 216 | if dir_fd is None: |
| 217 | return os.path.lexists(pathname) |
| 218 | try: |
| 219 | os.lstat(pathname, dir_fd=dir_fd) |
| 220 | except (OSError, ValueError): |
| 221 | return False |
| 222 | else: |
| 223 | return True |
| 224 | |
| 225 | def _isdir(pathname, dir_fd): |
| 226 | # Same as os.path.isdir(), but with dir_fd |