示例#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
 def get_acl(self, path):
     item = {}
     acl_get(path, item)
     return item