Lines Matching defs:path
4 import os.path
40 _badprefix=f'..{os.path.sep}',
42 """Return a normalized, absolute-path copy of the given filename."""
44 return os.path.abspath(filename)
46 relroot = os.path.abspath(relroot)
51 _badprefix=f'..{os.path.sep}',
56 filename = os.path.normpath(filename)
61 if not os.path.isabs(filename):
62 filename = os.path.join(relroot, filename)
64 relpath = os.path.relpath(filename, relroot)
65 if os.path.join(relroot, relpath) != filename:
73 filenames = (os.path.abspath(v) for v in filenames)
75 relroot = os.path.abspath(relroot)
83 _badprefix=f'..{os.path.sep}',
85 """Return a consistent relative-path representation of the filename."""
88 filename = os.path.normpath(filename)
94 filename = os.path.relpath(filename)
98 relroot = os.path.abspath(relroot)
101 filename = os.path.relpath(filename, relroot)
139 relroot = os.path.abspath(relroot)
197 yield os.path.join(parent, name)
251 filename as a relative path.
281 filename = os.path.relpath(filename, relparent)
358 elif hasattr(file, 'name') and os.path.exists(file.name):