import os
import time
import stat
# 定义一个函数,用来列出指定目录下的所有文件和文件夹
def list_directory(path):
#扫描指定目录下的所有文件和文件夹
entries=os.scandir(path)
#遍历每一个文件和文件夹
for entry in entries:
#获取文件和文件夹的权限
permissions=entry.stat().st_mode & 0o777
#获取文件和文件夹的硬链接数
hard_links=entry.stat().st_nlink
#获取文件和文件夹的所有者
owner=entry.stat().st_uid
#获取文件和文件夹的所有组
group=entry.stat().st_gid
#获取文件和文件夹的大小
size=entry.stat().st_size
#获取文件和文件夹的最后修改时间
mtime=time.ctime(entry.stat().st_mtime)
#获取文件和文件夹的名称
filename=entry.name
# print above all
print(f'{permissions:40} {hard_links:>5} {owner:<1} {group:<1} {size:>10} {mtime:<20} {filename}')
# 调用函数,列出当前目录下所有文件和文件夹
list_directory('.')
# your code goes here
aW1wb3J0IG9zCmltcG9ydCB0aW1lCmltcG9ydCBzdGF0CgojIOWumuS5ieS4gOS4quWHveaVsO+8jOeUqOadpeWIl+WHuuaMh+WumuebruW9leS4i+eahOaJgOacieaWh+S7tuWSjOaWh+S7tuWkuQpkZWYgbGlzdF9kaXJlY3RvcnkocGF0aCk6CiAgICAj5omr5o+P5oyH5a6a55uu5b2V5LiL55qE5omA5pyJ5paH5Lu25ZKM5paH5Lu25aS5CiAgICBlbnRyaWVzPW9zLnNjYW5kaXIocGF0aCkKICAgICPpgY3ljobmr4/kuIDkuKrmlofku7blkozmlofku7blpLkKICAgIGZvciBlbnRyeSBpbiBlbnRyaWVzOgogICAgICAgICPojrflj5bmlofku7blkozmlofku7blpLnnmoTmnYPpmZAKICAgICAgICBwZXJtaXNzaW9ucz1lbnRyeS5zdGF0KCkuc3RfbW9kZSAmIDBvNzc3CiAgICAgICAgI+iOt+WPluaWh+S7tuWSjOaWh+S7tuWkueeahOehrOmTvuaOpeaVsAogICAgICAgIGhhcmRfbGlua3M9ZW50cnkuc3RhdCgpLnN0X25saW5rCiAgICAgICAgI+iOt+WPluaWh+S7tuWSjOaWh+S7tuWkueeahOaJgOacieiAhQogICAgICAgIG93bmVyPWVudHJ5LnN0YXQoKS5zdF91aWQKICAgICAgICAj6I635Y+W5paH5Lu25ZKM5paH5Lu25aS555qE5omA5pyJ57uECiAgICAgICAgZ3JvdXA9ZW50cnkuc3RhdCgpLnN0X2dpZAogICAgICAgICPojrflj5bmlofku7blkozmlofku7blpLnnmoTlpKflsI8KICAgICAgICBzaXplPWVudHJ5LnN0YXQoKS5zdF9zaXplCiAgICAgICAgI+iOt+WPluaWh+S7tuWSjOaWh+S7tuWkueeahOacgOWQjuS/ruaUueaXtumXtAogICAgICAgIG10aW1lPXRpbWUuY3RpbWUoZW50cnkuc3RhdCgpLnN0X210aW1lKQogICAgICAgICPojrflj5bmlofku7blkozmlofku7blpLnnmoTlkI3np7AKICAgICAgICBmaWxlbmFtZT1lbnRyeS5uYW1lCiAgICAgICAgIyBwcmludCBhYm92ZSBhbGwKICAgICAgICBwcmludChmJ3twZXJtaXNzaW9uczo0MH0ge2hhcmRfbGlua3M6PjV9IHtvd25lcjo8MX0ge2dyb3VwOjwxfSB7c2l6ZTo+MTB9IHttdGltZTo8MjB9IHtmaWxlbmFtZX0nKQogICAgICAgIAojIOiwg+eUqOWHveaVsO+8jOWIl+WHuuW9k+WJjeebruW9leS4i+aJgOacieaWh+S7tuWSjOaWh+S7tuWkuQoKbGlzdF9kaXJlY3RvcnkoJy4nKQojIHlvdXIgY29kZSBnb2VzIGhlcmU=