2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: Create a new directory.
9 #include <aros/debug.h>
10 #include <exec/memory.h>
11 #include <proto/exec.h>
12 #include <utility/tagitem.h>
14 #include <proto/dos.h>
15 #include <proto/utility.h>
16 #include "dos_intern.h"
18 /*****************************************************************************
21 #include <proto/dos.h>
23 AROS_LH1(BPTR
, CreateDir
,
26 AROS_LHA(CONST_STRPTR
, name
, D1
),
29 struct DosLibrary
*, DOSBase
, 20, Dos
)
32 Creates a new directory under the given name. If all went well, an
33 exclusive lock on the new diretory is returned.
36 name - NUL terminated name.
39 Exclusive lock to the new directory or 0 if it couldn't be created.
40 IoErr() gives additional information in that case.
52 *****************************************************************************/
57 struct PacketHelperStruct phs
;
59 D(bug("[CreateDir] '%s'\n", name
));
61 if (getpacketinfo(DOSBase
, name
, &phs
)) {
62 lock
= (BPTR
)dopacket2(DOSBase
, NULL
, phs
.port
, ACTION_CREATE_DIR
, phs
.lock
, phs
.name
);
63 freepacketinfo(DOSBase
, &phs
);