| |
---|
| | import sys |
---|
| | |
---|
| | # Version info |
---|
| | |
---|
| | VERSION = "$Id: tdir,v 1.72 2018/05/11 17:42:04 tundra Exp $" |
---|
| | VERSION = "$Id: tdir,v 1.73 2018/06/17 00:00:00 tundra Exp $" |
---|
| | |
---|
| | |
---|
| | # Supporting Functions |
---|
| | |
---|
| |
---|
| | if not os.path.isdir(root): |
---|
| | sys.stdout.write(root + " is not a directory!\n") |
---|
| | sys.exit(2) |
---|
| | if RECURSE: |
---|
| | os.path.walk(root, BuildFileList, None) |
---|
| | for root, dir, files in os.walk(root): |
---|
| | print(root + os.sep) |
---|
| | else: |
---|
| | BuildFileList(None, root, os.listdir(root)) |
---|
| | |
---|
| | |
|