git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Implementing stat() with FindFirstFile()

From
MBMagnus Bäck <baeck@swipnet.se>
Date
Mar 26, 2009, 21:39 UTC
Message-ID
<20090326213907.GC27249@jeeves.jpl.local>
In-Reply-To
<49CB2BA5.1070100@viscovery.net>
On Thursday, March 26, 2009 at 08:15 CET,
     Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 14 quoted lines
> Magnus Bäck schrieb:
>
> > From what I gather the problematic conversion takes place in
> > the Win32 layer, in which case we might be able to call the
> > ZwQueryDirectoryFile() kernel routine directly via ntdll.dll
> > to obtain the file times straight from the file system. Has
> > anyone explored that path, and would it be acceptable to make
> > such a change?
>
> It depends.
>
> The disadvantages are that this function is only available on
> Windows XP and later and that it is not present in the header
> files of MinGW gcc.

I'd be very surprised if ZwQueryDirectoryFile() hasn't always been around (I just verified ntdll.dll from NT 4.0), so that's not a worry. Don't know why MSDN reports it as introduced in XP.

> It's on you to prove that there are advantages that clearly
> outweigh these disadvantages.

All right, I'll see if I can find time to take a look at this. I just wanted to check that it wasn't a project policy or whatever to bypass Win32.

-- 
Magnus Bäck
baeck@swipnet.se
Previous: Johannes SixtNext: Johannes Schindelin
Message 5 of 14 in “Implementing stat() with FindFirstFile()”
  1. Magnus BäckMar 21, 2009
  2. Johannes SixtMar 21, 2009
  3. Magnus BäckMar 24, 2009
  4. Johannes SixtMar 26, 2009
  5. Magnus BäckMar 26, 2009
  6. Johannes SchindelinMar 27, 2009
  7. Magnus BäckMar 29, 2009
  8. Johannes SchindelinMar 30, 2009
  9. Björn SteinbrinkMar 30, 2009
  10. Heiko VoigtMar 30, 2009
  11. Johannes SchindelinMar 30, 2009
  12. Magnus BäckMar 31, 2009
  13. Johannes SchindelinMar 31, 2009
  14. Nazri RamliyApr 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.