|
From: P.D. v. Z. <pa...@my...> - 2003-09-04 11:50:04
|
You're probably best off using the Win32 API functions FindFirstFile,
FindNextFile and FindClose... if you don't need portable code
(cross-platform code). Those functions will give you information about
the files matching a certain mask (*.txt for example) in the directory
you specify. You can then use this information to open the files if you
like. If you only need standard information, like the filesize for
example, you don't need to do anything else -- FindFirstFile and
FindNextFile already supply this information (using the WIN32_FIND_DATA
struct).
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of
at...@su...
Sent: Thursday, September 04, 2003 1:29 PM
To: dev...@li...
Subject: [Dev-C++] Access to filesystem
just doing c++ exercises, while learning, and need to read? or open? all
files of a directory, but got no idea who to manage it.
while searching the libary, I found the following hits for "filesystem"
regstr.h:
- REGSTR_PATH_FILESYSTEM
TEXT("System\\CurrentControlSet\\Control\\FileSystem")
- REGSTR_PATH_FILESYSTEM_NOVOLTRACK
TEXT("System\\CurrentControlSet\\Control\\FileSystem\\NoVolTrack")
- REGSTR_PATH_CDFS
TEXT("System\\CurrentControlSet\\Control\\FileSystem\\CDFS")
- REGSTR_PATH_CDFS
TEXT("System\\CurrentControlSet\\Control\\FileSystem\\CDFS")REGSTR_VAL_W
IN31FILESYSTEM TEXT("Win31FileSystem")
shlobj.h:
- #define SFGAO_FILESYSTEM 0x40000000L
winnt.h:
- #pragma pack(pop)
typedef enum _CM_SERVICE_NODE_TYPE {
DriverType=SERVICE_KERNEL_DRIVER,
FileSystemType=SERVICE_FILE_SYSTEM_DRIVER,
Win32ServiceOwnProcess=SERVICE_WIN32_OWN_PROCESS,
Win32ServiceShareProcess=SERVICE_WIN32_SHARE_PROCESS,
AdapterType=SERVICE_ADAPTER,
RecognizerType=SERVICE_RECOGNIZER_DRIVER
} SERVICE_NODE_TYPE;
and some more in deeper files.
Is this the right way, and if, where will I get informations how to
handle?
even http://cplus.about.com/library/blcplustut.htm got no hits.
thanx
regards
Achim
|