473,385 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

cross platform directory scanning

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
4 2049
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John J. Lee | last post by:
Today, I wanted to do something like this: def nr_files(dirName) try: return len(os.listdir(dirName)) except OSError, e: if e.errno == errno.ENOENT: return 0 else: raise
7
by: Web Master | last post by:
Are there any good websites or books that deal with cross platform XML? I'd like to target Internet Explorer/Netscape Navigator 5 or later, as well as Opera, possibly konqueror on Linux as well. ...
0
by: demibee | last post by:
Thought this might be of interest to some out there... For those who've never encountered it, it's a free, open-source, cross-platform GUI library (Windows/Mac/Linux). Forte's Agent 2.0 will be...
7
by: Charles | last post by:
I'd like to develop a simple cross-platform application in C++. I'd like it to run in Windows, OS X, PC-BSD and Linux. From my research, it seems I should use Qt or Gtk as a graphical library. Do...
5
by: Michael Reichenbach | last post by:
After working with script languages, notepad(++) and co. and several other ide`s I found something which really improved my productivity (Visual Studio 2005). It`s imho better then dev-cpp... I...
5
by: Spam Catcher | last post by:
Hello Everyone, I need to implement single sign on across serveral applications. Some applications are under my control while others are under the control of 3rd parties. Can anyone suggest a...
1
by: Vinod Sadanandan | last post by:
Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g The principal restriction on cross-platform transportable database is that the source and destination platform...
5
by: Hartmut Goebel | last post by:
Hi, has anybody used McMillan Installer, PyInstall or py2exe cross-platform? I have a Windows partition with Python installed there, so this would "only" required working on a different...
2
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.