def __init__(self, is_dir=False, is_file=False, size=0, ctime=time(), mtime=time(), atime=time()):
self.is_dir = is_dir
self.is_file = is_file
if self.is_dir:
self.attr = dict(st_mode=(S_IFDIR | 0o755), st_nlink=2)
if self.is_file:
self.attr = dict(st_mode=(S_IFREG | 0o755), st_nlink=1, st_size=size,
st_ctime=ctime, st_mtime=mtime, st_atime=atime)
self.attr["attrs"] = {}
评论列表
文章目录