473,569 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Portable Filesystem Library

Hi!

I'm working on a project that has to be portable (Windows, Linux, Unix (IDE
is VisualC++) ). What I need is the list of files in a certain directory
(+subdirs), but I also need to know some file attributes like size and 'date
of last change'.
Anybody knows a lib that can do this for me?

Thanks in advance
Janina
Jul 19 '05 #1
4 5268
Janina Kramer wrote:
Hi!

I'm working on a project that has to be portable (Windows, Linux,
Unix (IDE is VisualC++) ). What I need is the list of files in a
certain directory (+subdirs), but I also need to know some file
attributes like size and 'date of last change'.
Anybody knows a lib that can do this for me?


There was a beta library on Boost ( http://www.boost.org ) . I dunno its
state. If all else fails you might be able to use POSIX (and limit a loads
of things :-( ).

Attila
Jul 19 '05 #2
"Attila Feher" <at**********@l mf.ericsson.se> wrote in message news:<bi******* ***@newstree.wi se.edt.ericsson .se>...
Janina Kramer wrote:
Hi!

I'm working on a project that has to be portable (Windows, Linux,
Unix (IDE is VisualC++) ). What I need is the list of files in a
certain directory (+subdirs), but I also need to know some file
attributes like size and 'date of last change'.
Anybody knows a lib that can do this for me?


There was a beta library on Boost ( http://www.boost.org ) . I dunno its
state. If all else fails you might be able to use POSIX (and limit a loads
of things :-( ).

Attila


I've used the boost filesystem library on both Windows and Linux in
applications, and it seems to work nicely.

Jay
Jul 19 '05 #3
Hi Janina

"Janina Kramer" <j.******@schoo l-sucks.com> schrieb im Newsbeitrag
news:bi******** *****@news.t-online.com...
Hi!

I'm working on a project that has to be portable (Windows, Linux, Unix (IDE is VisualC++) ). What I need is the list of files in a certain directory
(+subdirs), but I also need to know some file attributes like size and 'date of last change'.
Anybody knows a lib that can do this for me?

Thanks in advance
Janina


I checked out boost.org myself too, and it says there that it only supports
POSIX or Windows-like OSes.
So, I am not really sure if this includes Linux and UNIX?
If you are using it already meanwhile, you may better stick to it.

If not, you can try my 'directory-scan' classes which work for sure on
Windows, Solaris and AIX.
It was developped with JBuilder but does not use much JBuilder-specific
stuff, so it should not be too complicated to convert it for Visual C++.
You'll find the files for download and HTML documentation on
http://gemini.futurezone.com
hth
René
=============== =============== =========
C++ sources, cross-platform (UNIX and WinTel) and
covering several topics: http://gemini.futurezone.com

Jul 19 '05 #4

"Rene Eng" <re*****@tiscal inet.ch> wrote in message news:3f******** **@news.tiscali net.ch...
I checked out boost.org myself too, and it says there that it only supports
POSIX or Windows-like OSes.
So, I am not really sure if this includes Linux and UNIX?


POSIX is an interface standard for UNIX-like operating systems.
LINUX and UNIX should not have a problem with it.
Jul 19 '05 #5

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

Similar topics

9
5796
by: Peter Hansen | last post by:
The term "mock filesystem" refers to code allowing unit or acceptance tests to create, read and write, and manipulate in other ways "virtual" files, without any actual disk access. Everything is held in memory and therefore fast, without risk of damaging real files, and with none of the messiness of leftover files after testing. Googling...
18
3150
by: perseus | last post by:
It is really crazy! I need to use the Boost filesystem for the manipulation of directories, and I have no idea how to install this filesystem on my IBM-compatible machine. Does anyone up here know how to do this? Thanks a million in advance! perseus
5
2009
by: Henri Schomäcker | last post by:
Hi folks, I have a quite big class, which I want to use on UNIX-like systems and on win32. Until now, everything is absolutely portable. But now I need to read a directory and use the os dependent functions. So need to define and include different libraries and functions for both OS-types. How can I do this using e.g. compiler #define's...
6
5387
by: Shaun Heveron | last post by:
Hi, I'm working on a portable ANSI C++ application designed to compile and execute under Windows and LINUX/UNIX. Is there a portable way of obtaining the current working directory? Sorry, if I'm being stupid... Thanks,
385
17008
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like extraneous jargons, such as in the Unix & Perl community. Unlike mathematicians, where in mathematics there are no fewer jargons but each and every...
131
6044
by: pemo | last post by:
Is C really portable? And, apologies, but this is possibly a little OT? In c.l.c we often see 'not portable' comments, but I wonder just how portable C apps really are. I don't write portable C code - *not only* because, in a 'C sense', I
3
361
by: yancheng.cheok | last post by:
i have a vendor function, which need to take into FILE* as function arguement. vendor_function_read_and_process(FILE* f) however, by reading from disk file during run-time, we get performance penalty. hence, instead of having f pointing to a disk file, we would like to have f mapped to a memory location.
2
4571
by: Javier | last post by:
Hello all, I'm trying to remove a hidden file (in UNIX) using the Boost::filesystem library. This is what I have: #include <boost/filesystem/operations.hpp> namespace fs=boost::filesystem;
23
3311
by: asit | last post by:
what is the difference between portable C, posix C and windows C ???
0
7700
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...
0
7924
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. ...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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...
0
3653
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
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

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.