Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!ruuinf!jeroen From: jeroen@ruuinf.cs.ruu.nl (Jeroen Fokker) Newsgroups: comp.sys.atari.st Subject: Creating a file in C Keywords: Fcreate, Fopen, slow Message-ID: <2275@ruuinf.cs.ruu.nl> Date: 8 Jan 90 14:58:25 GMT Organization: University of Utrecht, Dept. of CS Lines: 18 I want to open a file in R/W mode and be sure that it is empty. Here's how I do this now: Fdelete(name); (1) handle = Fcreate(name,0); (2) Fclose(handle); (3) handle = Fopen(name,2); (4) It is remarkably slow. Is there a better way to do it? If I leave out line 3&4, how does the Atari know I need R/W mode? If I leave out line 1, won't there be two copies of the file? If I leave out line 3, wouldn't I get two different file-descriptors? Please reply by e-mail to jeroen@cs.ruu.nl Thanks in advance! -- Jeroen Fokker, University of Utrecht, the Netherlands