This...
localFileName: aString
| dir entry parent fileNameWithoutTrailingSlash |
super localFileName: aString.
parent := FileDirectory default.
self flag: 'directoryExists: fails if trailing slash. Replace this whole mess with FS'.
fileNameWithoutTrailingSlash := fileName last = $/ ifTrue: [ fileName allButLast ] ifFalse: [ fileName ].
(parent directoryExists: fileNameWithoutTrailingSlash) ifTrue: [
dir := FileDirectory on: (parent fullNameFor: fileName).
entry := dir directoryEntry.
self modifiedAt: (DateAndTime fromSeconds: entry modificationTime) ].
fileName last = $/ ifFalse: [ fileName := fileName, '/' ].
(which I *think* had an undiscovered bug, invisible due to the complexity)
vs. This...
localFileName: aString
| file |
super localFileName: aString.
file := aString asFileReference.
file exists ifFalse: [ ^ self ].
self modifiedAt: file entry modificationTime.
Ahhhh...
Cheers,
Sean
Cheers,
Sean