Lines Matching defs:path
5 - os.path is either posixpath or ntpath
14 - os.defpath is the default search path for executables
15 - os.devnull is the file path of the null device ('/dev/null', etc.)
20 and opendir), and leave all pathname manipulation to os.path
37 "defpath", "name", "path", "devnull", "SEEK_SET", "SEEK_CUR",
50 # Any new dependencies of the os module and/or changes in path separator
61 import posixpath as path
81 import ntpath as path
95 sys.modules['os.path'] = path
96 from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
204 mkdir, except that any intermediate path segment (not just the rightmost)
210 head, tail = path.split(name)
212 head, tail = path.split(head)
213 if head and tail and not path.exists(head):
217 # Defeats race condition when another thread created the path
229 if not exist_ok or not path.isdir(name):
237 successfully removed, directories corresponding to rightmost path
238 segments will be pruned away until either the whole path is
244 head, tail = path.split(name)
246 head, tail = path.split(head)
252 head, tail = path.split(head)
261 path segments of the old name will be pruned until either the
262 whole path is consumed or a nonempty directory is found.
269 head, tail = path.split(new)
270 if head and tail and not path.exists(head):
273 head, tail = path.split(old)
290 dirpath is a string, the path to the directory. dirnames is a list of
294 Note that the names in the lists are just names, with no path components.
295 To get a full path (which begins with top) to a file or directory in
296 dirpath, do os.path.join(dirpath, name).
333 from os.path import join, getsize
380 # a directory, same behaviour than os.path.isdir().
399 # os.path.islink().
404 walk_dirs.append(entry.path)
411 islink, join = path.islink, path.join
414 # Issue #23605: os.path.islink() is used instead of caching
473 path.samestat(orig_st, stat(topfd)))):
525 if follow_symlinks or path.samestat(orig_st, stat(dirfd)):
526 dirpath = path.join(toppath, name)
596 if path.dirname(file):
605 fullname = path.join(dir, file)
1036 def _fspath(path):
1037 """Return the path representation of a path-like object.
1040 os.PathLike interface is used to get the path representation. If the
1041 path representation is not str or bytes, TypeError is raised. If the
1042 provided path is not str, bytes, or os.PathLike, TypeError is raised.
1044 if isinstance(path, (str, bytes)):
1045 return path
1049 path_type = type(path)
1051 path_repr = path_type.__fspath__(path)
1074 """Abstract base class for implementing the file system path protocol."""
1078 """Return the file system path representation of the object."""
1092 def __init__(self, path, cookie, remove_dll_directory):
1093 self.path = path
1098 self.path = None
1104 if self.path:
1105 return "<AddedDllDirectory({!r})>".format(self.path)
1108 def add_dll_directory(path):
1109 """Add a path to the DLL search path.
1111 This search path is used when resolving dependencies for imported
1112 extension modules (the module itself is resolved through sys.path),
1119 cookie = nt._add_dll_directory(path)
1121 path,