🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #3703

Re: Deleting files from within C ?

#3703
From: markv
Date: Thu, 31 May 1990 17:47
26 lines
1587 bytes
> Markus> How does one delete files on (say) the RAM: disc from *within*
> Markus> a C program?  I'm just starting to learn C, and I've set
> Markus> myself a project that would make use of this.  I want to
> Markus> create temporary work files, and clean up when I finish. It
> Markus> *is* possible, right?
> 
> Certainly.  The function you're looking for is DeleteFile(), in the
> dos.library.  It takes a single parameter, the (C-style) string
> containing the name of the file you want to delete.  It returns an
> error if the deletion fails.

What's wrong with ANSI C?  How about...

	#include <stdio.h>
	...
	remove("RAM:foofile");
 
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  markgood	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <24614.26651251@kuhub.cc.ukans.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!uwm.edu!wuarchive!kuhub.cc.ukans.edu!markv
References: <2136.265c6de6@csc.anu.oz> <DEVEN.90May24105328@netserv2.rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!uwm.edu!wuarchive!kuhub.cc.ukans.edu!markv
From: markv@kuhub.cc.ukans.edu
Newsgroups: comp.sys.amiga.tech
Subject: Re: Deleting files from within C ?
Message-ID: <24614.26651251@kuhub.cc.ukans.edu>
Date: 31 May 90 17:47:12 GMT
References: <2136.265c6de6@csc.anu.oz> <DEVEN.90May24105328@netserv2.rpi.edu>
Organization: University of Kansas Academic Computing Services
Lines: 26