Lines Matching refs:name
35 _WINDOWS = os.name == 'nt'
37 if os.name == 'posix':
99 err.filename = fsrc.name
100 err.filename2 = fdst.name
147 err.filename = fsrc.name
148 err.filename2 = fdst.name
327 for name in names:
329 value = os.getxattr(src, name, follow_symlinks=follow_symlinks)
330 os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
360 def lookup(name):
361 return getattr(os, name, _nop)
365 def lookup(name):
366 fn = getattr(os, name, _nop)
455 ignored_names = ignore(os.fspath(src), [x.name for x in entries])
464 if srcentry.name in ignored_names:
466 srcname = os.path.join(src, srcentry.name)
467 dstname = os.path.join(dst, srcentry.name)
471 if is_symlink and os.name == 'nt':
638 fullname = os.path.join(path, entry.name)
653 dirfd = os.open(entry.name, os.O_RDONLY, dir_fd=topfd)
664 os.rmdir(entry.name, dir_fd=topfd)
681 os.unlink(entry.name, dir_fd=topfd)
797 recreated under the new name if os.rename() fails because of cross
863 def _get_gid(name):
864 """Returns a gid, given a group name."""
865 if name is None:
874 result = getgrnam(name)
881 def _get_uid(name):
882 """Returns an uid, given a user name."""
883 if name is None:
892 result = getpwnam(name)
974 name of the output zip file.
1007 for name in sorted(dirnames):
1008 path = os.path.join(dirpath, name)
1009 arcname = os.path.join(arcdirpath, name)
1013 for name in filenames:
1014 path = os.path.join(dirpath, name)
1017 arcname = os.path.join(arcdirpath, name)
1026 # Maps the name of the archive format to a tuple containing:
1052 Each element of the returned sequence is a tuple (name, description)
1054 formats = [(name, registry[2]) for name, registry in
1059 def register_archive_format(name, function, extra_args=None, description=''):
1062 name is the name of the format. function is the callable that will be
1064 (name, value) tuples that will be passed as arguments to the callable.
1078 _ARCHIVE_FORMATS[name] = (function, extra_args, description, False)
1080 def unregister_archive_format(name):
1081 del _ARCHIVE_FORMATS[name]
1087 'base_name' is the name of the file to create, minus any format-specific
1096 to the current directory. Returns the name of the archive file.
1147 (name, extensions, description)
1149 formats = [(name, info[0], info[3]) for name, info in
1158 for name, info in _UNPACK_FORMATS.items():
1160 existing_extensions[ext] = name
1172 def register_unpack_format(name, extensions, function, extra_args=None,
1176 `name` is the name of the format. `extensions` is a list of extensions
1185 (name, value) tuples that will be passed as arguments to the callable.
1192 _UNPACK_FORMATS[name] = extensions, function, extra_args, description
1194 def unregister_unpack_format(name):
1196 del _UNPACK_FORMATS[name]
1215 name = info.filename
1218 if name.startswith('/') or '..' in name:
1221 targetpath = os.path.join(extract_dir, *name.split('/'))
1226 if not name.endswith('/'):
1228 with zip.open(name, 'r') as source, \
1248 # Maps the name of the unpack format to a tuple containing:
1271 for name, info in _UNPACK_FORMATS.items():
1274 return name
1280 `filename` is the name of the archive.
1282 `extract_dir` is the name of the target directory, where the archive
1523 name = os.path.join(dir, thefile)
1524 if _access_check(name, mode):
1525 return name