2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Touch CLI command.
9 /******************************************************************************
26 Sets the time stamp of the file to the current time. If the file doesn't
27 exist it will be created.
31 NAME -- The name of the file to be touched.
47 ******************************************************************************/
50 #include <proto/dos.h>
52 const TEXT version
[] = "$VER: Touch 41.2 (8.8.2016)";
59 struct RDArgs
*rda
= ReadArgs("NAME/A", args
, NULL
);
65 /* Attempt to update the file's date stamp */
66 if (SetFileDate((CONST_STRPTR
)args
[0], DateStamp(&ds
))) {
70 /* Attempt to create the file, if needed */
71 BPTR fh
= Open((STRPTR
)args
[0], MODE_NEWFILE
);
81 PrintFault(IoErr(), NULL
);