2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <dos/dosasl.h>
9 #include <exec/types.h>
10 #include <exec/memory.h>
11 #include <proto/exec.h>
16 void ReadAll(BPTR lock
)
18 struct FileInfoBlock
* FIB
= AllocVec(sizeof(struct FileInfoBlock
), MEMF_CLEAR
);
22 success
= Examine(lock
, FIB
);
23 if (FIB
->fib_DirEntryType
< 0)
26 success
= ExNext(lock
, FIB
);
29 printf("%s",FIB
->fib_FileName
);
30 if (FIB
->fib_DirEntryType
> 0)
36 char * name
= AllocVec(1024,0);
38 NameFromLock(lock
,name
,1024);
39 AddPart(name
,FIB
->fib_FileName
,1024);
40 printf("Entering %s\n",name
);
41 tmplock
= Lock(name
, ACCESS_READ
);
43 NameFromLock(lock
,name
,1024);
44 printf("Returning to %s\n",name
);
53 success
= ExNext(lock
,FIB
);
58 int main(int argc
, char *argv
[])
62 printf("Trying to scan %s \n",argv
[1]);
63 lock
= Lock(argv
[1],ACCESS_READ
);
70 printf("no such directory/assign!\n");