home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d457
/
cmanual
/
acm3.lzh
/
AmigaDOS
/
Example4.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-12
|
850b
|
35 lines
/* Example 4 */
/* This example demonstrates how to delete files and directories. It */
/* will delete the file Example 1 and directory Example 2 created. */
/* (The file and directory are supposed to have been renamed by */
/* Example 3.) */
/* This file declares the type BOOL: */
#include <exec/types.h>
void main();
void main()
{
BOOL ok;
/* Delete the file: */
ok = DeleteFile( "RAM:Numbers.dat" );
/* Check if the file was successfully deleted: */
if( !ok )
printf( "The file could not be deleted!\n" );
/* Delete the directory: */
ok = DeleteFile( "RAM:NewDirectory" );
/* Check if the directory was successfully deleted: */
if( !ok )
printf( "The directory could not be deleted!\n" );
}