Topic: Reading Directory Entries
Author: ksaleh@my-deja.com
Date: 1999/09/04 Raw View
My Boland compiler comes with 2 header files that can be used to read
directory entries : <dir.h> and <dirent.h>, are these portable ?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: clamage@eng.sun.com (Steve Clamage)
Date: 1999/09/06 Raw View
ksaleh@my-deja.com writes:
>My Boland compiler comes with 2 header files that can be used to read
>directory entries : <dir.h> and <dirent.h>, are these portable ?
They are not part of the C or C++ standards, so you can't
expect to use the code everywhere.
--
Steve Clamage, stephen.clamage@sun.com
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Scott Robert Ladd" <scott@coyotegulch.com>
Date: 1999/09/07 Raw View
<ksaleh@my-deja.com> wrote...
> My Boland compiler comes with 2 header files that can be used to read
> directory entries : <dir.h> and <dirent.h>, are these portable ?
Neither Standard C nor C++ define functions for finding files. Using either
of the header files above will make your code non-Standard. The aren't even
portable across wintel compilers; Borland and Microsoft have different
header file names and function semantics, for example.
Encapsulate the file-searching code, and comment it well -- that's what I've
had to do.
--
* Scott Robert Ladd
* Coyote Gulch Productions - http://www.coyotegulch.com
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]