473,231 Members | 2,999 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,231 software developers and data experts.

accessing directories using C++

Hello

How can i access the directory structure in C++? (I used to use the DIR
structure in C earlier). is there a specialised way to access
directories in C++?

What my requirement is that i want to list the contents of a directory
similar to the ls command in linux. Please tell me how to go abt doing
this.

Thank you in advance

Jul 23 '05 #1
2 1299
Casanova http://www.prashanthmohan.tk wrote:
Hello

How can i access the directory structure in C++? (I used to use the DIR
structure in C earlier). is there a specialised way to access
directories in C++?

What my requirement is that i want to list the contents of a directory
similar to the ls command in linux. Please tell me how to go abt doing
this.

Thank you in advance


There is no standard library module for interfacing with directory
structures, but there are plenty of good libraries for it. Check out
boost::filesystem, in particular the simple_ls program:

http://www.boost.org/libs/filesystem.../simple_ls.cpp
Jul 23 '05 #2
Casanova http://www.prashanthmohan.tk wrote:
Hello

How can i access the directory structure in C++? (I used to use the DIR
structure in C earlier).

Which is not part of the C standard.

is there a specialised way to access
directories in C++?

You will have to use system-specific facilities for this.

What my requirement is that i want to list the contents of a directory
similar to the ls command in linux. Please tell me how to go abt doing
this.

Check some API documentation on the OS you are going to use.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
2
by: R. Readi | last post by:
Is it possible in UNIX/BSD? Just to give inode instead of path name for accessing files. Thanks, Rodrigo
2
by: Jeffry van de Vuurst | last post by:
Hi, (sorry for the crosspost, I wasn't sure which was the best place to put this). I was just thinking about something and wondered if any of you has some ideas about this. I'm using the...
0
by: Dave Friedel | last post by:
I read through the WS2 samples but I am still fuzzy on how to access the settings I need to validate my users passwords. Specifically, I do not know how to tell which hostheader is being accessed...
1
by: homesick123 | last post by:
Hi I am very new to perl.I want to write a script which will access the directories and their sub-directories.For eg. -default ----main -------dir1 ---------- ------------ ...
8
by: supasnail | last post by:
I have a happily working set of asp pages which read from the database via include file "./_private/include/database.mdb". However, when I try to gain access to this database on pages one folder...
6
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project...
6
by: Adam McCormack | last post by:
Good morning, I hope I'm not repeating a post, but I did try to search for the topic before asking. I am trying to resolve an issue that has come up as a result of planned migration from a single...
4
by: Edwin Velez | last post by:
http://msdn.microsoft.com/en-us/library/806sc8c5.aspx The URL above gives sample code for use within a Console Application. What I would like to do is use this code within a Windows Form. That...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.