Use more appropriate types for pt_regs struct, e.g. 16-bit types for 16-bit
[cake.git] / rom / dos / setfiledate.c
blob3d69c77efca61eac6a5caba72dffe125716aca02
1 /*
2 Copyright © 1995-2008, 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(const 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 Boolean success indicator. IoErr() gives additional information upon
39 failure.
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 CopyMem(date, &iofs.io_Union.io_SET_DATE.io_Date, sizeof(struct DateStamp));
63 return DoIOFS(&iofs, NULL, name, DOSBase) == 0;
65 AROS_LIBFUNC_EXIT
66 } /* SetFileDate */