2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: Change the date of a file.
10 #include <aros/debug.h>
11 #include <proto/exec.h>
12 #include <dos/dosextens.h>
13 #include <proto/dos.h>
14 #include "dos_intern.h"
16 /*****************************************************************************
19 #include <proto/dos.h>
22 AROS_LH2(BOOL
, SetFileDate
,
25 AROS_LHA(CONST_STRPTR
, name
, D1
),
26 AROS_LHA(const struct DateStamp
*, date
, D2
),
29 struct DosLibrary
*, DOSBase
, 66, Dos
)
32 Change the modification time of a file or directory.
35 name - name of the file
39 Boolean success indicator. IoErr() gives additional information upon
52 *****************************************************************************/
56 struct PacketHelperStruct phs
;
57 LONG status
= DOSFALSE
;
59 D(bug("[SetFileDate] '%s' %x\n", name
, date
));
61 if (getpacketinfo(DOSBase
, name
, &phs
)) {
62 status
= dopacket4(DOSBase
, NULL
, phs
.port
, ACTION_SET_DATE
, (IPTR
)NULL
, phs
.lock
, phs
.name
, (IPTR
)date
);
63 freepacketinfo(DOSBase
, &phs
);