Re: Listing All Files In A Filesystem
- From: David Holden <black_hole@xxxxxxxxxx>
- Date: Thu, 5 Apr 2007 18:25:49 GMT
On 5-Apr-2007, Rob Kendrick <nntp@xxxxxxxx> wrote:
On Thu, 05 Apr 2007 17:45:18 +0000, Michael Emerton wrote:
Yet Another enquiry! :@) You must be getting annoyed of me now! :@P
How would I list all files in the Filesystem?
having looked in the OS manuals, I could not find anything useful
One of the OS_GBPB reason codes allows you to enumerate a directory
iteratively. Use this recursively, starting from the root directory.
also how do I list all Filesystems available?
Tricky. There may be a SWI to enumerate these, I forget. But looping
over them shouldn't be too tricky as there aren't many "file system
numbers". The problem you have is that not all of these file systems are
sensible to show the use to select from. For example, it's unlikely that
the user has MP3s stored in PipeFS, DeviceFS or ResourceFS, so you'd have
to include a black list.
Actually it's not that difficult. You just need to scan all the filesystem
numbers (0 to 255) to find out which ones are 'active'. You can then
interrogate them and find out if they control drives, and which drives. If
they don't control drives they'd be of no interest since filesystems which
don't couldn't return meaningful data. Once you know the filesystem and it's
drives you can use OS_GBPB recursively from the root directory to get all
the files.
--
David Holden - APDL - <http://www.apdl.co.uk>
.
- Follow-Ups:
- Re: Listing All Files In A Filesystem
- From: Rob Kendrick
- Re: Listing All Files In A Filesystem
- References:
- Listing All Files In A Filesystem
- From: Michael Emerton
- Re: Listing All Files In A Filesystem
- From: Rob Kendrick
- Listing All Files In A Filesystem
- Prev by Date: Re: Listing All Files In A Filesystem
- Next by Date: Re: Listing All Files In A Filesystem
- Previous by thread: Re: Listing All Files In A Filesystem
- Next by thread: Re: Listing All Files In A Filesystem
- Index(es):
Relevant Pages
|