2023-02-25 01:48

This commit is contained in:
2023-02-25 01:48:44 +09:00
commit 90d9816ea2
9 changed files with 151 additions and 0 deletions

18
filewalk.py Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/python
import os
from posixpath import dirname
def main(rootDir):
for (root, dirs, files) in os.walk(rootDir):
print("-> " + root)
if len(dirs) > 0:
for dirName in dirs:
print(dirName)
if len(files) > 0:
for fileName in files:
print(fileName)
if __name__ == "__main__":
main("/home/elex/Workspace/ELEX")