added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / dos / setfiledate.c
blob6025c8ca6b07d913b076ed4ce17c94e86529295c
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Change the date of a file.
6 Lang: English
7 */
8 #include <string.h>
9 #include <proto/exec.h>
10 #include <dos/dosextens.h>
11 #include <dos/filesystem.h>
12 #include <proto/dos.h>
13 #include "dos_intern.h"
15 /*****************************************************************************
17 NAME */
18 #include <proto/dos.h>
19 #include <dos/dos.h>
21 AROS_LH2(BOOL, SetFileDate,
23 /* SYNOPSIS */
24 AROS_LHA(CONST_STRPTR, name, D1),
25 AROS_LHA(struct DateStamp *, date, D2),
27 /* LOCATION */
28 struct DosLibrary *, DOSBase, 66, Dos)
30 /* FUNCTION
31 Change the modification time of a file or directory.
33 INPUTS
34 name - name of the file
35 date - new file time
37 RESULT
38 != 0 if all went well, 0 else. IoErr() gives additional
39 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_SET_DATE, DOSBase);
61 memcpy(&iofs.io_Union.io_SET_DATE.io_Date, date, sizeof(struct DateStamp));
63 return DoIOFS(&iofs, NULL, name, DOSBase) == 0;
65 AROS_LIBFUNC_EXIT
66 } /* SetFileDate */