| |
---|
| | import sys |
---|
| | |
---|
| | # Version info |
---|
| | |
---|
| | VERSION = "$Id: tdir,v 1.57 2001/06/27 20:24:39 tundra Exp $" |
---|
| | VERSION = "$Id: tdir,v 1.58 2001/07/03 20:29:19 tundra Exp $" |
---|
| | |
---|
| | |
---|
| | # Booleans |
---|
| | |
---|
| |
---|
| | def BuildFileList (args, dir, files): |
---|
| | DirList = [] |
---|
| | FileList = [] |
---|
| | for x in files: |
---|
| | if os.path.isdir(dir + "/" + x) and SHOWDIR: |
---|
| | DirList.append(x) |
---|
| | if (dir[-1] == '/') or (dir[-1] == '\\'): # This if/else sequence necessary because |
---|
| | dirstring = dir + x # 'tdir /' did not properly report directories |
---|
| | else: # on WinDoze32 systems which appears to |
---|
| | dirstring = dir + "/" + x # handle '//' or '\/' in files names very well. |
---|
| | if os.path.isdir(dirstring): |
---|
| | if SHOWDIR: |
---|
| | DirList.append(x) |
---|
| | elif SHOWFILE: |
---|
| | FileList.append(x) |
---|
| | DisplayOutput(dir, DirList, FileList) |
---|
| | |
---|
| |
---|
| | |