2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: Change the date of a file.
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 /*****************************************************************************
18 #include <proto/dos.h>
21 AROS_LH2(BOOL
, SetFileDate
,
24 AROS_LHA(CONST_STRPTR
, name
, D1
),
25 AROS_LHA(const struct DateStamp
*, date
, D2
),
28 struct DosLibrary
*, DOSBase
, 66, Dos
)
31 Change the modification time of a file or directory.
34 name - name of the file
38 Boolean success indicator. IoErr() gives additional information upon
51 *****************************************************************************/
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;