| |
---|
| | |
---|
| | PROGNAME = "tren.py" |
---|
| | BASENAME = PROGNAME.split(".py")[0] |
---|
| | PROGENV = BASENAME.upper() |
---|
| | RCSID = "$Id: tren.py,v 1.204 2010/03/19 02:07:02 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.205 2010/03/19 02:57:35 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | stats = os.stat(fullname) |
---|
| | except (IOError, OSError) as e: |
---|
| | ErrorMsg(eFILEOPEN % (fullname, e.args[1])) |
---|
| | |
---|
| | # Some operating systems (Windows) terminate the path with |
---|
| | # a separator, some (Posix) do not. |
---|
| | |
---|
| | if pathname[-1] != os.sep: |
---|
| | pathname += os.sep |
---|
| | |
---|
| | # Store fullname, basename, and stat info for this file |
---|
| | |
---|
| | if basename: |
---|
| | self.RenNames[fullname] = {BASE : basename, PATHNAME : pathname + os.sep, STATS : stats} |
---|
| | self.RenNames[fullname] = {BASE : basename, PATHNAME : pathname, STATS : stats} |
---|
| | |
---|
| | # Catch the case where they're trying to rename the root of the directory tree |
---|
| | |
---|
| | else: |
---|
| |
---|
| | |