2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <dos/dosextens.h>
9 #include <proto/exec.h>
10 #include <proto/dos.h>
15 int main(int argc
, char **argv
) {
20 printf("usage: %s filename newsize\n", argv
[0]);
24 fh
= Open(argv
[1], MODE_READWRITE
);
26 PrintFault(IoErr(), "SetFileSize");
30 size
= SetFileSize(fh
, atol(argv
[2]), OFFSET_BEGINNING
);
32 PrintFault(IoErr(), "SetFileSize");
37 Printf("New size is %ld bytes\n", size
);