On 2024-04-04, at 4:55 PM, Tim Rowledge tim@rowledge.org wrote:
Current trunk Squeak will return nil if one tries to do 'nonexistentfilename' asDirectoryEntry but FileMan will create an FmDirectoryEntry; so any code that anticipates nil meaning "the file wasn't there" will have issues.
For example, SmalltalkImage>>#patchSystem
As a contrast, there are several methods where returning nil will cause an error, just for fun. See e.g. GIFReadWriterTest>>#testColorsFileOutIn, CommandShell class>>#fileExists:inDirectory:, and then again SmalltalkImage>>#locateSourcesEntry: wouldn't crash but would behave potentially dangerously.
To nil, or not to nil, is that the question?
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- One too many lights out in his Christmas tree.