2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Change the size of a file.
8 #include <proto/exec.h>
9 #include <dos/dosextens.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
15 #include <proto/dos.h>
17 AROS_LH3(LONG
, SetFileSize
,
20 AROS_LHA(BPTR
, file
, D1
),
21 AROS_LHA(LONG
, offset
, D2
),
22 AROS_LHA(LONG
, mode
, D3
),
25 struct DosLibrary
*, DOSBase
, 76, Dos
)
28 Change the size of a file.
32 offset - relative size
33 mode - OFFSET_BEGINNING, OFFSET_CURRENT or OFFSET_END
36 New size of the file or -1 in case of an error.
37 IoErr() gives additional information in that case.
49 *****************************************************************************/
53 /* Get pointer to filehandle */
54 struct FileHandle
*fh
= BADDR(file
);
57 status
= dopacket3(DOSBase
, NULL
, fh
->fh_Type
, ACTION_SET_FILE_SIZE
, fh
->fh_Arg1
, offset
, mode
);