some fixes to accented characters
[tangerine.git] / rom / dos / deletefile.c
blob6022e7996907a6000bbdbe2ed2baa1fc929c58c0
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Delete a file or directory.
6 Lang: English
7 */
8 #include <exec/memory.h>
9 #include <proto/exec.h>
10 #include <utility/tagitem.h>
11 #include <dos/dos.h>
12 #include <dos/filesystem.h>
13 #include <proto/dos.h>
14 #include <proto/utility.h>
15 #include "dos_intern.h"
17 /*****************************************************************************
19 NAME */
20 #include <proto/dos.h>
22 AROS_LH1(BOOL, DeleteFile,
24 /* SYNOPSIS */
25 AROS_LHA(CONST_STRPTR, name, D1),
27 /* LOCATION */
28 struct DosLibrary *, DOSBase, 12, Dos)
30 /* FUNCTION
31 Tries to delete a file or directory by a given name.
32 May fail if the file is in use or protected from deletion.
34 INPUTS
35 name - NUL terminated name.
37 RESULT
38 != 0 if the file is gone, 0 if is still there.
39 IoErr() gives additional information in that case.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 /* Get pointer to I/O request. Use stackspace for now. */
56 struct IOFileSys iofs;
58 /* Prepare I/O request. */
59 InitIOFS(&iofs, FSA_DELETE_OBJECT, DOSBase);
61 if (DoIOFS(&iofs, NULL, name, DOSBase) == 0)
62 return DOSTRUE;
63 else
64 return DOSFALSE;
66 AROS_LIBFUNC_EXIT
67 } /* DeleteFile */