Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #791

Re: OS_GBPB 9 - Read filenames from directory

NNTP-Posting-Date Wed, 28 Sep 2011 09:25:29 -0500
From "Ste (news)" <steve@revi11.plus.com>
Subject Re: OS_GBPB 9 - Read filenames from directory
Newsgroups comp.sys.acorn.programmer
Date Wed, 28 Sep 2011 15:25:26 +0100
Message-ID <5219d7839bsteve@revi11.plus.com> (permalink)
References <5218550b41News03@avisoft.f9.co.uk>
User-Agent Pluto/3.04d (RISC-OS/5.17) NewsHound/v1.50-32
Organization None
Lines 25
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-dAmB0LtZ7twQ4kwyV3f3ANROavnumq+yKKsr6NHJ/+1oZVM7VN9Mv1u7/JMJQjMCqtyNQvhMPK0mq8F!5q0ZNTOutcR93yb21u7oh58uAIct4JqXd8Gblrfcu/YfQ+UDuEbP0w55iohzET7d1HshJ2nUbJ8B!3w==
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1981
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
Xref x330-a1.tempe.blueboxinc.net comp.sys.acorn.programmer:791

Show key headers only | View raw


In article <5218550b41News03@avisoft.f9.co.uk>,
   Martin <News03@avisoft.f9.co.uk> wrote:
> The SWI OS_GBPB,9-12 can be used for reading a list of file names from a
> directory. The PRM page 2-70 makes no mention of the sequence in which
> the files are returned, so it must presumably be assumed that they will
> be in an indeterminate sequence.

Correct. The objects are returned in whatever order the underlying file
system feels like. For FileCore-based file systems, this happens to be
alphabetical (ASCII) order. For network file systems (LanMan, NFS, etc) and
others (HostFS, etc) you'll probably get them in some other order.

This is a PITA, because you need to make a number of calls to GBPB (if
you're iterating over everything) and add all of the objects to a list which
you then have to sort later. It would've been nice if the OS presented a
call to do that for you, instead of umpteen developers re-inventing that
wheel over the years...

Ta,

Steve

-- 
Steve Revill @ Home
Note: All opinions expressed herein are my own.

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

OS_GBPB 9 - Read filenames from directory Martin <News03@avisoft.f9.co.uk> - 2011-09-25 17:04 +0100
  Re: OS_GBPB 9 - Read filenames from directory Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-09-25 20:18 +0200
  Re: OS_GBPB 9 - Read filenames from directory Terminal Crazy <Terminal_Crazy@sand-hill.freeserve.co.uk> - 2011-09-25 20:14 +0100
    Re: OS_GBPB 9 - Read filenames from directory jeff <jeffrey.a.doggett@gmail.com> - 2011-09-26 00:35 -0700
  Re: OS_GBPB 9 - Read filenames from directory "Ste (news)" <steve@revi11.plus.com> - 2011-09-28 15:25 +0100
    Re: OS_GBPB 9 - Read filenames from directory Vince M Hudd <vinceh@softrock.co.uk> - 2011-09-29 11:34 +0100
      Re: OS_GBPB 9 - Read filenames from directory "Ste (news)" <steve@revi11.plus.com> - 2011-09-29 12:39 +0100
        Re: OS_GBPB 9 - Read filenames from directory jgharston <jgh@arcade.demon.co.uk> - 2011-10-09 16:23 -0700

csiph-web