[comp.sys.mac.programmer] Think Pascal help needed

englfz@uhvax1.uh.edu (02/28/90)

I'm using Think Pascal and need to create and delete temporary files
within the program.  Creating the files is no problem, bu I don't know how 
to tell Pascal to tell th Mac to trash the files I no longer need.

Can anyone help me?

siegel@endor.harvard.edu (Rich Siegel) (02/28/90)

In article <5678.25ea6806@uhvax1.uh.edu> englfz@uhvax1.uh.edu writes:
>I'm using Think Pascal and need to create and delete temporary files
>within the program.  Creating the files is no problem, bu I don't know how 
>to tell Pascal to tell th Mac to trash the files I no longer need.

	If you use standard Pascal calls to create anonymous files,
those files will be deleted when the program terminates. If you're going
to use the Mac file system calls, you'll need to keep a list of the files
that you've created, and delete them as the last action in your program.

R.



~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"When someone who makes four hundred and fifty dollars an hour wants to
tell you something for free, it's a good idea to listen."

~~~~~~~~~~~~~~~

Jim.Spencer@p5.f22.n282.z1.FIDONET.ORG (Jim Spencer) (03/01/90)

 >I'm using Think Pascal and need to create and delete temporary files
 >within the program.  Creating the files is no problem, bu I don't know how 
 >to tell Pascal to tell th Mac to trash the files I no longer need.

High-Level routine FSDelete(fileName: Str255; vRefNum: INTEGER) : OSErr; should work fine for you.  See Inside Mac Vol. IV, pg. 113.

--  
Jim Spencer - via FidoNet node 1:282/33
UUCP: ...!uunet!imagery!22.5!Jim.Spencer
ARPA: Jim.Spencer@p5.f22.n282.z1.FIDONET.ORG