Re: _wstat on Windows (actually stat stuff in general)
- From: Milan Bouchet-Valat <nalimilan club fr>
- To: Kean Johnston <kean johnston gmail com>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>, Alexander Larsson <alexl redhat com>
- Subject: Re: _wstat on Windows (actually stat stuff in general)
- Date: Wed, 28 Sep 2011 11:13:16 +0200
Le mercredi 28 septembre 2011 à 11:03 +0200, Kean Johnston a écrit :
> Only if you define "UNIX" as "Linux". OSX has other fields Linux doesn't.
> Some UNIX variants have 16-bit uid_t's others have 32. Some have as low as
> 16-bit ino_t's others have 64. There are all KINDS of ways in which it
> differs. Offering a portable, no-ifdefs-required,
> suitably-large-sized-to-accomodate-everyone structure ... yes *STRUCTURE*
> that all code can use completely portably without having to worry about
> anything ... SURELY you can see the value in that? GFileInfo from GIO? You
> have GOT to be kidding me? As a replacement for stat()? When I want to look
> up a file attribute I have to go through hash table lookups for attributes
> and a completely open-ended size (GArray *attributes) and all that parent
> class and instance overhead - versus having a single structure I can
> sizeof() and write to a file? In what universe is that a better approach?
Do you have a use case where hash-table lookups would be a bottleneck?
With dual-core CPUs we have nowadays, disk access is likely to be much
slower than the hash-table work that GIO produces. And few programs
would need to stat that many files anyway.
Cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]