Naja, ich habe das damals in TP immer so realisiert (auf Delphi portiert):
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| function FileExists(const FileName:string):boolean; var f:File; begin {$I-} Assign(f, FileName); Reset(f); Close(f); {$I+} Result:=IOResult=0; end; |
Das prüft allerdings mehr auf Lesbarkeit als auf Existens, aber was besseres wäre mir erstmal nicht bekannt (jedenfalls nicht mit Hausmitteln).
Gruß,
maxk
// Edit: An
CREATEFILE hatte ich jetzt gar nicht gedacht

Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.