コード例 #1
0
ファイル: archive.py プロジェクト: aykit/borg
 def stat_attrs(self, st, path):
     item = {
         b'mode': st.st_mode,
         b'uid': st.st_uid, b'user': uid2user(st.st_uid),
         b'gid': st.st_gid, b'group': gid2group(st.st_gid),
         b'mtime': int_to_bigint(st_mtime_ns(st))
     }
     if self.numeric_owner:
         item[b'user'] = item[b'group'] = None
     xattrs = xattr.get_all(path, follow_symlinks=False)
     if xattrs:
         item[b'xattrs'] = StableDict(xattrs)
     if has_lchflags and st.st_flags:
         item[b'bsdflags'] = st.st_flags
     acl_get(path, item, st, self.numeric_owner)
     return item
コード例 #2
0
ファイル: archive.py プロジェクト: nonsub/attic
 def stat_attrs(self, st, path):
     item = {
         b'mode': st.st_mode,
         b'uid': st.st_uid,
         b'user': uid2user(st.st_uid),
         b'gid': st.st_gid,
         b'group': gid2group(st.st_gid),
         b'mtime': int_to_bigint(st_mtime_ns(st))
     }
     if self.numeric_owner:
         item[b'user'] = item[b'group'] = None
     xattrs = xattr.get_all(path, follow_symlinks=False)
     if xattrs:
         item[b'xattrs'] = StableDict(xattrs)
     if has_lchflags and st.st_flags:
         item[b'bsdflags'] = st.st_flags
     acl_get(path, item, st, self.numeric_owner)
     return item
コード例 #3
0
ファイル: archive.py プロジェクト: jbms/attic
 def stat_attrs(self, st, path):
     item = {
         b"mode": st.st_mode,
         b"uid": st.st_uid,
         b"user": uid2user(st.st_uid),
         b"gid": st.st_gid,
         b"group": gid2group(st.st_gid),
         b"mtime": st_mtime_ns(st),
     }
     if self.numeric_owner:
         item[b"user"] = item[b"group"] = None
     xattrs = xattr.get_all(path, follow_symlinks=False)
     if xattrs:
         item[b"xattrs"] = StableDict(xattrs)
     if has_lchflags and st.st_flags:
         item[b"bsdflags"] = st.st_flags
     item[b"acl"] = acl_get(path, item, self.numeric_owner)
     return item
コード例 #4
0
 def get_acl(self, path, numeric_owner=False):
     item = {}
     acl_get(path, item, numeric_owner=numeric_owner)
     return item
コード例 #5
0
ファイル: platform.py プロジェクト: jbms/attic
 def get_acl(self, path, numeric_owner=False):
     item = {}
     acl_get(path, item, numeric_owner=numeric_owner)
     return item
コード例 #6
0
 def get_acl(self, path):
     item = {}
     acl_get(path, item)
     return item
コード例 #7
0
ファイル: platform.py プロジェクト: sherbang/attic
 def get_acl(self, path):
     item = {}
     acl_get(path, item)
     return item