2 Copyright © 1995-2001, 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(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 != 0 if all went well, 0 else. IoErr() gives additional
39 information in that case.
51 *****************************************************************************/
54 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
56 /* Get pointer to I/O request. Use stackspace for now. */
57 struct IOFileSys iofs
;
59 /* Prepare I/O request. */
60 InitIOFS(&iofs
, FSA_SET_DATE
, DOSBase
);
62 memcpy(&iofs
.io_Union
.io_SET_DATE
.io_Date
, date
, sizeof(struct DateStamp
));
64 return !DoName(&iofs
, name
, DOSBase
);