Article View: borland.public.cppbuilder.nativeapi
Article #17103Re: get file specs
From: user
Date: Wed, 09 Apr 2003 11:45
Date: Wed, 09 Apr 2003 11:45
27 lines
1719 bytes
1719 bytes
DeKayA@bellsouth.net wrote:
> Surely there is a cleaner way...
>
FindFirstFile returns lots of file specs:
WIN32_FIND_DATA ffd;
HANDLE hff = FindFirstFile(Path.c_str(), &ffd);
if (INVALID_HANDLE_VALUE != hff)
{
// do something with the fields in ffd...
FindClose(hff);
}
To be specific:
typedef struct _WIN32_FIND_DATA { // wfd
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
TCHAR cFileName[ MAX_PATH ];
TCHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATA;
Technical Details
Message-ID:
<3E9407D5.30205@domain.invalid>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e931a5f.198205@forums.inprise.com> <3e939179.20005948@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d799131d9f6242d1 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-09 04:53:09 PST Message-ID: <3E9407D5.30205@domain.invalid> Date: Wed, 09 Apr 2003 07:45:25 -0400 From: user@domain.invalid User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: get file specs References: <3e931a5f.198205@forums.inprise.com> <3e939179.20005948@forums.inprise.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.162.165.211 X-Trace: newsgroups.borland.com 1049888743 68.162.165.211 (9 Apr 2003 04:45:43 -0800) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail