By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,306 Members | 1,657 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,306 IT Pros & Developers. It's quick & easy.

cross platform directory scanning

P: n/a
Hello!
I'm looking for cross-platform directory scanning library working with
ansi C. I need to use in in GNU Linux and Windows. I need to do simple
directory and files opertionson both OS, can you recomend me some
solution? Thank you in advance.

Regards,
Nazgob

Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Nazgob wrote on 31/07/05 :
I'm looking for cross-platform directory scanning library working with
ansi C.


There are no directories at all in ISO-C. The best you can use are the
POSIX.1 portable functions like readdir(), opendir() etc.

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

I once asked an expert COBOL programmer, how to
declare local variables in COBOL, the reply was:
"what is a local variable?"
Nov 15 '05 #2

P: n/a
"Emmanuel Delahaye" <em***@YOURBRAnoos.fr> wrote in message
news:mn***********************@YOURBRAnoos.fr...
Nazgob wrote on 31/07/05 :
I'm looking for cross-platform directory scanning library working with
ansi C.


There are no directories at all in ISO-C. The best you can use are the
POSIX.1 portable functions like readdir(), opendir() etc.


True. Gcc should have those (even DJGPP has). Borland compilers used to have
those POSIX *dir() functions and Watcom too. But Microsoft's VC++ doesn't
have them (at least not in v6.0).

Alex
Nov 15 '05 #3

P: n/a
On Sun, 31 Jul 2005 18:10:31 +0400, Alexei A. Frounze wrote:
"Emmanuel Delahaye" <em***@YOURBRAnoos.fr> wrote in message
news:mn***********************@YOURBRAnoos.fr...
Nazgob wrote on 31/07/05 :
> I'm looking for cross-platform directory scanning library working with
> ansi C.


There are no directories at all in ISO-C. The best you can use are the
POSIX.1 portable functions like readdir(), opendir() etc.


True. Gcc should have those (even DJGPP has). Borland compilers used to have
those POSIX *dir() functions and Watcom too. But Microsoft's VC++ doesn't
have them (at least not in v6.0).


<OT>
An OS lecturer at my university used to frequently assert that Windows NT
was POSIX-compliant (I don't recall whether he qualified it with
"mostly"). He was pretty knowledgeable so no doubt there's truth to the
statement, but I've never investigated how much.
</OT>

Nov 15 '05 #4

P: n/a
"Netocrat" <ne******@dodo.com.au> wrote in message
news:pa****************************@dodo.com.au...
On Sun, 31 Jul 2005 18:10:31 +0400, Alexei A. Frounze wrote:
"Emmanuel Delahaye" <em***@YOURBRAnoos.fr> wrote in message
news:mn***********************@YOURBRAnoos.fr...
Nazgob wrote on 31/07/05 :
> I'm looking for cross-platform directory scanning library working with > ansi C.

There are no directories at all in ISO-C. The best you can use are the
POSIX.1 portable functions like readdir(), opendir() etc.


True. Gcc should have those (even DJGPP has). Borland compilers used to have those POSIX *dir() functions and Watcom too. But Microsoft's VC++ doesn't have them (at least not in v6.0).


<OT>
An OS lecturer at my university used to frequently assert that Windows NT
was POSIX-compliant (I don't recall whether he qualified it with
"mostly"). He was pretty knowledgeable so no doubt there's truth to the
statement, but I've never investigated how much.
</OT>


I'd recommend everyone doing portable software look at what the Single Unix
Specification has (includes ANSI C and POSIX functions and others) and use
those. If they're not available on the target system, I believe, quite a bit
of them can be constructed out of what is there. Anyways, some compatibility
layer is due.

Alex
Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.