<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 03 Aug 2009 17:52:11 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Counting Directory Entries in L3 Econet

"Ian Wolstenholme" wrote:
> Is there a call I can use to find out how many entries are in a
> directory on Level 3 Econet? I need something which will save multiple
 
There is no way to find out how many entries there are in a
directory without actually counting them. And even then, due to the
way that the universe operates, there is no guarrantee that that
total will remain the same after you've counted them. Some other
process may change the contents of the directory while you are
accessing it.
 
> files without encountering a Dir full error which can be left unsupervised.
> 
> What I really need is a way of finding out if the next save would cause an
> error before it executes the command.
 
No way, as the only way you can tell if an action will cause an
error is to attempt the action. Are you programming in BASIC? If
you're programming in 6502, Z80, 32016, PDP-11 or ARM you can make
error-returning MOS calls instead of error-generating MOS calls.
See <http://beebwiki.jonripley.com/Catching_errors>.
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
BBC BASIC for Windows and Internationalisation
  See http://mdfs.net/Software/BBCBasic/Windows/ProgTips
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>