MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_info

Method get_info

Lib/tarfile.py:1006–1032  ·  view source on GitHub ↗

Return the TarInfo's attributes as a dictionary.

(self)

Source from the content-addressed store, hash-verified

1004 return result
1005
1006 def get_info(self):
1007 """Return the TarInfo's attributes as a dictionary.
1008 """
1009 if self.mode is None:
1010 mode = None
1011 else:
1012 mode = self.mode & 0o7777
1013 info = {
1014 "name": self.name,
1015 "mode": mode,
1016 "uid": self.uid,
1017 "gid": self.gid,
1018 "size": self.size,
1019 "mtime": self.mtime,
1020 "chksum": self.chksum,
1021 "type": self.type,
1022 "linkname": self.linkname,
1023 "uname": self.uname,
1024 "gname": self.gname,
1025 "devmajor": self.devmajor,
1026 "devminor": self.devminor
1027 }
1028
1029 if info["type"] == DIRTYPE and not info["name"].endswith("/"):
1030 info["name"] += "/"
1031
1032 return info
1033
1034 def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="surrogateescape"):
1035 """Return a tar header as a string of 512 byte blocks.

Callers 7

tobufMethod · 0.95
test_get_infoMethod · 0.45
check_infoMethod · 0.45
_infoMethod · 0.45

Calls 1

endswithMethod · 0.45

Tested by 5

test_get_infoMethod · 0.36
check_infoMethod · 0.36