2025-01-09T14:30:26
This commit is contained in:
18
src0/filewalk.py
Executable file
18
src0/filewalk.py
Executable 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")
|
||||
Reference in New Issue
Block a user