2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
8 #include "dos_intern.h"
11 /*****************************************************************************
14 #include <exec/types.h>
15 #include <proto/dos.h>
17 AROS_LH1(BPTR
, ParentDir
,
20 AROS_LHA(BPTR
, lock
, D1
),
23 struct DosLibrary
*, DOSBase
, 35, Dos
)
26 Returns a lock to the parent directory of the supplied lock.
29 lock - Lock to get parent directory of.
32 Returns a lock to the parent directory or NULL, in which case the
33 supplied lock has no parent directory (because it is the root
34 directory) or an error occured. IoErr() returns 0 in the former case
35 and a different value on error.
42 Locks get via ParentDir() are currently never unlocked! Use this
49 *****************************************************************************/
53 BPTR oldlock
= CurrentDir(lock
), newlock
;
55 newlock
= Lock("/", ACCESS_READ
);