Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #5680
| From | Martin <News03@avisoft.f9.co.uk> |
|---|---|
| Subject | Re: Traversing a directory in BASIC... |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2019-01-21 23:04 +0000 |
| Message-ID | <577a109ff4News03@avisoft.f9.co.uk> (permalink) |
| References | <5551f8d2-bbd0-4d15-aa64-bc799be24414@googlegroups.com> |
| Organization | None |
On 21 Jan in article <5551f8d2-bbd0-4d15-aa64-bc799be24414@googlegroups.com>, <usenet@garethlock.com> wrote: > I'm trying to write a routine that returns a list of items, both > files and directories, in a given directory. Think I might have hit > on something using OS_GBPB, but one has to supply the number of > items to read. Been trying OS_FSControl 28 to return a count before > calling OS_GBPB, can get this to count files, but not directories... > Has anyone come across a better way of doing this?? Nope. OS_GBPB is the way to go. The number of objects to read on entry is the *maximum* to read in one go. The actual number that has been read is returned, and it may be zero. To go to the end of a directory you need to repeat until r4=-1. A simple structure for the code can be seen in the OS StrongHelp manual, if you do not have the PRMs. -- Martin Avison Note that unfortunately this email address will become invalid without notice if (when) any spam is received.
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Traversing a directory in BASIC... usenet@garethlock.com - 2019-01-21 13:48 -0800
Re: Traversing a directory in BASIC... Gerald Holdsworth <nospam@hollypops.co.uk> - 2019-01-21 22:18 +0000
Re: Traversing a directory in BASIC... Steve Fryatt <news@stevefryatt.org.uk> - 2019-01-21 22:44 +0000
Re: Traversing a directory in BASIC... usenet@garethlock.com - 2019-01-21 15:02 -0800
Re: Traversing a directory in BASIC... Steve Fryatt <news@stevefryatt.org.uk> - 2019-01-21 23:59 +0000
Re: Traversing a directory in BASIC... usenet@garethlock.com - 2019-01-21 18:12 -0800
Re: Traversing a directory in BASIC... Matthew Phillips <spam2011m@yahoo.co.uk> - 2019-01-22 08:14 +0000
Re: Traversing a directory in BASIC... Martin <News03@avisoft.f9.co.uk> - 2019-01-21 23:04 +0000
Re: Traversing a directory in BASIC... usenet@garethlock.com - 2019-01-21 15:53 -0800
Re: Traversing a directory in BASIC... Alan Adams <alan@adamshome.org.uk> - 2019-01-22 12:26 +0000
Re: Traversing a directory in BASIC... Martin <News03@avisoft.f9.co.uk> - 2019-01-22 16:30 +0000
Re: Traversing a directory in BASIC... jgh@mdfs.net - 2019-01-23 05:26 -0800
Re: Traversing a directory in BASIC... Alan Adams <alan@adamshome.org.uk> - 2019-01-23 15:01 +0000
Re: Traversing a directory in BASIC... David Higton <dave@davehigton.me.uk> - 2019-01-24 14:35 +0000
Re: Traversing a directory in BASIC... Richard Porter <dontusethis@address.uk.invalid> - 2019-01-27 23:33 +0000
csiph-web