1 #include <dos/dosasl.h>
4 #include <exec/types.h>
5 #include <exec/memory.h>
6 #include <proto/exec.h>
11 void ReadAll(BPTR lock
)
13 struct FileInfoBlock
* FIB
= AllocVec(sizeof(struct FileInfoBlock
), MEMF_CLEAR
);
17 success
= Examine(lock
, FIB
);
18 success
= ExNext(lock
,FIB
);
21 printf("%s",FIB
->fib_FileName
);
22 if (FIB
->fib_DirEntryType
> 0)
28 char * name
= AllocVec(1024,0);
30 NameFromLock(lock
,name
,1024);
31 AddPart(name
,FIB
->fib_FileName
,1024);
32 printf("Entering %s\n",name
);
33 tmplock
= Lock(name
, ACCESS_READ
);
35 NameFromLock(lock
,name
,1024);
36 printf("Returning to %s\n",name
);
45 success
= ExNext(lock
,FIB
);
50 int main(int argc
, char *argv
[])
54 printf("Trying to scan %s \n",argv
[1]);
55 lock
= Lock(argv
[1],ACCESS_READ
);
62 printf("no such directory/assign!\n");