<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 21 Jun 1996 13:11:10
From   : pnt103@...
Subject: Re:  OS calls for directories?

This is in response to Mark's questions about DFS/ADFS...

OSGBPB (or OS-heebie-jeebie, as one of my friends used to call it) at
&FFD1 with A=6 reads the current drive and directory name into the block
addressed by XY.  

XY+1   drive name length
XY+2   drive name in ASCII
XY+n   directory name length
XY+n+1 directory name in ASCII

For DFS and ADFS, the drive name is one ASCII character, for NFS and
later systems, it may be more.

OSGBPB with A=7 does the same for the current library.

To set the current directory, use OSCLI (&FFF7) with XY pointing to the
address of the command.  The command format is just as you would type it
at the > or * prompt, with ASCII 13 (carriage-return) as a terminator;
it doesn't nead a leading "*".

To read the contents of the directory, use OSGBPB with A=8.  

On entry: 
XY+1..XY+4   pointer to a buffer
XY+5..XY+8   a 32-bit number, the number of filenames to transfer
XY+9..XY+13  32-bit number, the number of the first filename to transfer
On exit: 
buffer contains a list of filenames, each in the format
length (one byte)
name   (string of ASCII characters)

As to your question about *info, this is nominally "filing system
specific", but as far as I remember, NFS, ADFS and 1770DFS 2.23 (you
should be using DFS 2.29, though) have the same format as "ordinary"
DFS.  The intent is to show the filename, protection/access-rights,
load- and exec-addresses, and length (all in hex).  However, it is
different on an Arc, where the files are "typed" and date/time-stamped,
so the info is quite different.

Why are you using this information?  If you want to comply with the ethos
of filing system independence, you'd be better to use OSGBPB with A=8 to
read the filenames, and then OSFILE with A=5 to get all the file information
(this works for any file system except RFS).  It even works on an Arc...

Pete

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>