<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 02 Aug 2009 20:19:58 +0100
From   : bbcmailinglist@... (Ian Wolstenholme)
Subject: Counting Directory Entries in L3 Econet

I've had a go, but you can only transfer about 20 filenames at a time or
you get the No reply error.  If you try to transfer more than 115 files
then you get F.S. Error 4E.

Each call doesn't take too long though, so it's acceptable to set up a loop
to increment the "first file asked for" in the entry control block by 20
each time
until the result is that some files weren't transferred, and then the "next
file to ask for" in the exit control block is the number of files in the
directory,
because the first entry is numbered 0 not 1.

Then I realised that counting the number of entries in the directory isn't
the end in itself, it's the means to the end.  I need to know if the directory
is going to be full before I do the next save, and counting how many entries
are in the directory seemed to be the way to discover this.

However, I can use the call starting at a high number of entries (say the
maximum size less 10) to discover whether the "next file to ask for" is
the maximum number or not.  If it's one less than the maximum number,
I've got room to create a new directory, move to that directory and then
continue with the save, all with only one OSGBPB call.

Code here if anyone's interested:

www.BeebMaster.co.uk/downloads/DirFull.txt


Best wishes,



Ian


----- Original Message -----
From: Rob [mailto:robert@...]
To: bbcmailinglist@...
Cc: bbc-micro@...
Sent: Sun, 2 Aug 2009 15:55:56 +0100
Subject: Re: [BBC-Micro] Counting Directory Entries in L3 Econet

On 02/08/2009, Ian Wolstenholme <bbcmailinglist@...> wrote:
> I thought OSGBPB 8 was the most likely when I was looking at chapter 10
> of the MDFS manual last night, but you would have to reserve 2.5 kilobytes
> (totally confused about the correct abbreviations now, so I'm using the full
> version!) of RAM to have enough space to get all the filenames if the
> directory
> was full.
>

The page I linked to seems to indicate that you can call it for any
arbitary number of  filenames at a time, and that it also returns the
number not yet read .. Now that reads to me that you can add one
figure to the other and you should have the total in the directory.


> However, according to the Econet Advanced User Guide (which incidentally
> I have just noticed is signed on the inside front cover "R O'Donnell"!!) it

Hmm!!  Now either I lost it at Byte Back, and I've not missed it yet
(does it have lots of corrections all the way through?) or you bought
one of my spare copies off eBay in 2002 or so, when I had a clear out
..


Rob

_______________________________________________
bbc-micro mailing list
bbc-micro@...
http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>