The c68 libraries contain a number of routines for reading directories.
Using these would probably be easiest as they hide the knowledge of what
file type a directory is (normally 255 but not on all systems!) and having
to be aware of file system header formats.
There are basically two families of routines:
- One set is the Unix compatible routines (opendir, readir, etc).
- The other set are some QDOS/SMSQ specific routines (e.g. qdir_read).
I will see if I can dig out a simple example code fragment from one of the
utility programs.
Dave
----- Original Message -----
From: "James Hunkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 12:04 PM
Subject: [ql-users] 'c' Help - reading directories
>
> Guys,
>
> I need to be able to search a drive directory for a specific file using
> 'C' code. Is there somewhere that I can find either a piece of sample
> code ('C' or assembly) for reading file names (or traversing
> directories) from a directory/device? Or perhaps just general
> documentation on SMSQ/E directories and file names that would lead me
> to the method to do so?
>
> Thanks,
> Jim Hunkins
>