comp.lang.ada
 help / color / mirror / Atom feed
* Re: Reading Filenames
  2000-01-29  0:00 Reading Filenames -=[CheecH]=-
@ 2000-01-29  0:00 ` David
  2000-01-29  0:00 ` Laurent Guerby
  1 sibling, 0 replies; 3+ messages in thread
From: David @ 2000-01-29  0:00 UTC (permalink / raw)
  To: cheech

In article <86v59u$l05$1@newsg3.svr.pol.co.uk>,
  "-=[CheecH]=-" <cheech@chongs.freeserve.co.uk> wrote:
> I want to write a little programme which can read in all the
filenames in a
> directory and write them to a text file.  But I have have no idea how
to
> read all the names in.  Can any one help please
It is difficult to give precise answers when you state neither the
platform (hardware and OS), nor the compiler you are using.

The most portable approach I can suggest is to use the appropriate one
of the existing Ada bindings for POSIX 1003.5

For Win32 there is a partial binding that includes what you need at:
http://perso.wanadoo.fr/pascal.obry/w32posix.html

For UNIX platforms, you can look for the FLORIST bindings in several
places.  The generic implementation is at
ftp://ftp.cs.fsu.edu/pub/PART/FLORIST/
there are also implementations at
ftp://ftp.cs.nyu.edu/pub/gnat/florist/ and at
http://www.gnuada.org/alt.html

Once you have the proper POSIX library for your platform and compiler,
use the subprograms in the package POSIX.Files



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Reading Filenames
@ 2000-01-29  0:00 -=[CheecH]=-
  2000-01-29  0:00 ` David
  2000-01-29  0:00 ` Laurent Guerby
  0 siblings, 2 replies; 3+ messages in thread
From: -=[CheecH]=- @ 2000-01-29  0:00 UTC (permalink / raw)


I want to write a little programme which can read in all the filenames in a
directory and write them to a text file.  But I have have no idea how to
read all the names in.  Can any one help please.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reading Filenames
  2000-01-29  0:00 Reading Filenames -=[CheecH]=-
  2000-01-29  0:00 ` David
@ 2000-01-29  0:00 ` Laurent Guerby
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Guerby @ 2000-01-29  0:00 UTC (permalink / raw)


"-=[CheecH]=-" <cheech@chongs.freeserve.co.uk> writes:
> I want to write a little programme which can read in all the
> filenames in a directory and write them to a text file.  But I have
> have no idea how to read all the names in.  Can any one help please.

If you use GNAT look for the file g-dirope.ads in your adainclude directory:

<<
--  This package provides routines for manipulating directories. A directory
--  can be treated as a file, using open and close routines, and a scanning
--  routine is provided for iterating through the entries in a directory.

package GNAT.Directory_Operations is
>>

--LG




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-01-29  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-29  0:00 Reading Filenames -=[CheecH]=-
2000-01-29  0:00 ` David
2000-01-29  0:00 ` Laurent Guerby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox