sukumar@emx.utexas.edu (Sukumar Rathnam) (01/24/91)
The following seems to be the only way to detect if a file exists. The principle is to use Disk file:xxx. Check the size. If size > 0 file exists (refer to tim menzies solution). Since the code fragment will create a file if it does not exist it would help to check the createtime of the file and if it is less than epsilon from current time then preserve else delete. sukumar From ctumey@csd4.csd.uwm.edu Thu Jan 17 08:01:42 1991 From: Carol T Tumey <ctumey@csd4.csd.uwm.edu> Open the file using: (File pathName: <insert fileName>) Then look at the size of the file. If it is zero, then the file doesn't exist. Alternatively you could create a directory listing and parse it. I really don't like either one, but at the time I did it, I couldn't figure out a better means. From timm@runxtsa.runx.oz.au Sun Jan 20 16:15:08 1991 From: timm@runx.oz.au (Tim Menzies) (File pathName: xxx) size > 0 ifTrue: [Menu message: 'file exists'] ifFalse:[Menu message: 'file don''t exist']