473,395 Members | 1,574 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,395 software developers and data experts.

files and subdirectories

I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?

Thanks.

Sep 20 '06 #1
3 2615
Gaijinco wrote:
Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?
Try typing "dirent.h" into google and clicking on the first
entry returned. Worked for me.

HTH,
- J.
Sep 20 '06 #2
Gaijinco wrote:
I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?

Thanks.
Do you really need a library, or do you just need to read a directory?
A quick hack would be to use the system function.

system("cmd /C \"dir /b myprog.dir\"");
ifstream dir("myprog.dir");

Other than that: read the plattform specific documentation that came
with your OS and/or compiler. There is some kind of interface to handle
directories on each plattform, you just need to find it.

Sep 20 '06 #3
Gaijinco <ga******@gmail.comwrote:
I'm looking for libraries to handle basic operations on files and
subdirectories as listing the files and the subdirectories of a
directory.

Someone suggest me <dirent.h(which is supported by g++) but I
couldn't find clear information about its usage.

Does anyone knows a more documented alternative? Or a good reference to
<dirent.h>?
Try the Boost Filesystem library.

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Sep 20 '06 #4

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

Similar topics

5
by: Anand K Rayudu | last post by:
Hi all, I am trying to find a way to get the files recursively in a given directory, The following code is failing, can some one please suggest what could be problem here from os import...
2
by: Arjen | last post by:
Hello, I want to make a command line application that search for *.htm* files inside directories and subdirectories. 1. How can I save all the *.htm* files inside directories and...
8
by: RML | last post by:
hey guys, i am looking at this piece of code that lists numbers of files in a directory. i want to convert it so it lists the files in th directory that end with .doc. i cant seem to get it to...
2
by: melo | last post by:
Hello, I've been struggling with a function(s) to recursively set all folders and files to NOT read-only. So, I thought I'd post this message. What I need to do is: given a starting path, I...
4
by: Yves | last post by:
Hello, I have a little question. I want to make a small app that counts all the files located in a specific directory (chosen via a FolderBrowserDialog by a user). The question is: is there a...
2
by: kamalak | last post by:
hi, can someone help me in writing code in C# for getting the no of files in a directory and all its subdirectories and their subdirectories where the no of subdirectories and their...
8
by: theCancerus | last post by:
Hi All, I am not sure if this is the right place to ask this question but i am very sure you may have faced this problem, i have already found some post related to this but not the answer i am...
8
by: Anil Gupte | last post by:
Hi all! Hope you can help me. I want to find all files matching a wildcard in all subdirectories. Is there a quick way to do that? For example in DOS I can go dir *.txt /s and it will find...
2
by: dj | last post by:
Hello All, I am attempting to us os.walk to populate two lists with values from a directory. The first list contains all the files in the directory and subdirectories. The second list contains...
4
by: supriyamk | last post by:
Hi, I am trying to search a directory for subdirectories, recreate the subdirectories elsewhere and copy only certain files from current subdirectory to new subdirectory. In other words i am...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.