用户:
保守的飓风雀pmao查看:1 回复:3 评论:1 创建时间:2023-09-24T12:05:18
今天偶然发现Python云服务器是可以访问到内部文件的
from os import walk,scandir,path
# folder path
dir_path = '/home/codemao'
# list to store files name
res = []
for (dir_path, dir_names, file_names) in walk(dir_path):
res.extend(file_names)
print(res)