July 3, 2009
10:55 a.m.
Forgetting the wish for new File accessing implementations for a moment, is there a reason why the current StandardFileStream >> oldFileNamed: (and oldFileFullyNamed) is implemented: ^(self isAFileNamed: fileName) ifTrue: [self new open: fileName forWrite: true] ifFalse: [(FileDoesNotExistException fileName: fileName) signal] instead of : ^(self new open: fullName forWrite: true) ifNil: ["File does not exist..." (FileDoesNotExistException fileName: fullName) signal] ? Feels abit silly to open a file to see if it exists, then close it, then open it again before returning it... (It also causes an unneccessary rehash of StandardFileStream registry on success) Cheers, Henry