473,766 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to Open Sub Directory to access a file in linux

4 New Member
Hi everyone

I want to open the Directory like this using C++ in linux

eg : /proc/1/status

where proc and 1 is a directory and status is a file,which i want to access(i.e)this file i have to copy to an string to access some information.... ..............c an anyone help
Dec 17 '10 #1
1 2732
mac11
256 Contributor
boost has an excellent filesystem library that I would recommend for any filesystem operations. You'll have to spend a bit of time to become familiar with it, but it saves you headache and nightmare later on.

http://www.boost.org/doc/libs/1_45_0.../doc/index.htm

If you decide not to use boost there's opendir() and such. 'man opendir' will show you about it and lead you to related functions. But really, prefer boost here since you have C++!
Dec 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
715
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit anyway).... Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) If e.ChangeType = WatcherChangeTypes.Created Then
10
2134
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application. -------------------------------------------------------------------------------- The Microsoft Jet database engine cannot open the file 'D:\Program Files\Infragistics\NetAdvantage 2005 Volume 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
4
2311
by: klynn | last post by:
Hi: I'm having problems reading a Microsoft Access file from my ASP.Net app on a Windows Server 2003 machine. The error message: The Microsoft database engine cannot open the file, <my_file>. It is already opened exclusively by another user, or you need permission to view its data. I've read some info about this (microsoft support article q316675) but I'm still confused on what to do?
1
3755
by: vasilip | last post by:
root@Server:/opt/ibm/db2/V9.1/bin# ./db2adutl ../db2adutl: error while loading shared libraries: libApiDS.so: cannot open shared object file: No such file or directory I just installed db2 9.1 express-c for linux to give it a try since I have been using the windows version.. it seems to be missing some libs.. I searched google for the .so file and havnt' found much... since I'm not that much of a linux expert.
0
1265
by: eholz1 | last post by:
Hello PHP group, I have a question about file locations, and whether on not (in my case, not) a page will execute depending on the location of the php file. I have a web devel server, with a directory below htdocs (using Apache 2.2 on Fedora Linux) /usr/local/apache2/htdocs/portfolios and /usr/local/apache2/htdocs/ portfolios/setup
24
5079
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the same code, except a different name for the file. The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
3
3449
by: Swapnil Vaidya | last post by:
Hi All, I am getting very strange problem regarding MS Access. I am using Access 97.I have one mdb file. What happens is that when a user double clicks the shortcut to this file, it doesn't respond at all when there's already someone using the file. But if no one is using the file, it responds immediately. I dont know whether its a MS Access problem or not. Your quick response will be highly appreciated...
2
4884
by: shaiful | last post by:
Hi all, I am a beginer of VB. I wanna to put a button on my form which will able to do open directory ( not file) from copmuter only, thx a lot for help and idea, Sam
3
2439
by: tvnaidu | last post by:
any open source LDAP server (active directory) for Windows/Linux?
2
6986
by: Rhuddlan | last post by:
Hi, I am using RedHat EL 4 and I developed an oracle 10g based application by using cx_Oracle (cx_Oracle-4.3.1-10g-py23-1.i386.rpm) and Python 2.3.4. Running the application through direct console, when I try to import the cx_Oracle, I get the following error message: ImportError: /usr/lib/python2.3/site-packages/cx_Oracle.so: cannot open shared object file: No such file or directory And it seems there is no any shared library lost:
0
9571
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10168
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9838
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.