* w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
@ 2009-05-20 19:46 MON KEY
2009-05-20 20:02 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2009-05-20 19:46 UTC (permalink / raw)
To: emacs-devel
(file-attributes "u:/a/w32path/on/FAT32/formatted/removable/drive")
;;;=>(t 1 0 0 (18948 65472) (18950 1330) (18950 1328) 0 "drwxrwxrwx" t
(7484788 . 1152) (25026 . 58322))
;;; why is `nth 4' (e.g. Last access time) of that list giving the
weird time-value on FAT32 drive?
(current-time-string (quote (18948 65472)))
;;;=>"Sat May 09 00:00:00 2009"
Whereas on a similarly directory created on an NTFS volume I get:
(file-attributes "c:/Documents and
Settings/path/on/a/w32path/NTFS/formatted/drive")
;;;=>(t 1 1004 513 (18964 23862) (18957 32124) (18944 28179) 0
"drwxrwxrwx" nil 0 (45128 . 62390))
(current-time-string (quote (18964 23862)))
;;;=>"Wed May 20 15:42:46 2009"
Am I missing something?
s_P
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
2009-05-20 19:46 w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp? MON KEY
@ 2009-05-20 20:02 ` Eli Zaretskii
2009-05-21 2:15 ` MON KEY
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2009-05-20 20:02 UTC (permalink / raw)
To: MON KEY; +Cc: emacs-devel
> Date: Wed, 20 May 2009 15:46:19 -0400
> From: MON KEY <monkey@sandpframing.com>
>
> (file-attributes "u:/a/w32path/on/FAT32/formatted/removable/drive")
> ;;;=>(t 1 0 0 (18948 65472) (18950 1330) (18950 1328) 0 "drwxrwxrwx" t
> (7484788 . 1152) (25026 . 58322))
>
> ;;; why is `nth 4' (e.g. Last access time) of that list giving the
> weird time-value on FAT32 drive?
> (current-time-string (quote (18948 65472)))
> ;;;=>"Sat May 09 00:00:00 2009"
>
> Whereas on a similarly directory created on an NTFS volume I get:
> (file-attributes "c:/Documents and
> Settings/path/on/a/w32path/NTFS/formatted/drive")
> ;;;=>(t 1 1004 513 (18964 23862) (18957 32124) (18944 28179) 0
> "drwxrwxrwx" nil 0 (45128 . 62390))
>
> (current-time-string (quote (18964 23862)))
> ;;;=>"Wed May 20 15:42:46 2009"
>
> Am I missing something?
I think you are missing the fact that on FAT32, the last-access time
actually records only the date, with no time. Whereas on NTFS, it's a
full-fledged time stamp.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
2009-05-20 20:02 ` Eli Zaretskii
@ 2009-05-21 2:15 ` MON KEY
2009-05-21 3:28 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2009-05-21 2:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> I think you are missing the fact that on FAT32, the last-access time
> actually records only the date, with no time.
That would be the culprit :)
per wikipedia: (URL
`http://en.wikipedia.org/wiki/File_Allocation_Table#Directory_table');
:Byte Offset 0x10 :Length 2 :Description Create date. The year, month
and day are encoded according to the following bitmap
:Bits 15-9 :Description Year (0 = 1980, 127 = 2107)
:Bits 8-5 :Description Month (1 = January, 12 = December)
:Bits 4-0 :Description Day (1 - 31)
:Byte Offset 0x10 :Length 2 :Description Last access date; see offset
0x10 for description.
While it is prob. unreasonable to assume Emacs document the vagaries
of myriad filesystems (esp. non-free ones),
when examining the docstring - e.g. `file-attributes' - it is not at
all possible to deduce that _some_ file-systems will return correct
but counter-intuitive results:
``4. Last access time, as a list of two integers.
First integer has high-order 16 bits of time, second has low 16 bits.
5. Last modification time, likewise.
6. Last status change time, likewise.''
Are there other filesytems with similar un-features?
If so, is it an actively used one - i.e. not antiquated, obsolete,
deprecated, non-free, etc.?
s_P
On Wed, May 20, 2009 at 4:02 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Wed, 20 May 2009 15:46:19 -0400
>> From: MON KEY <monkey@sandpframing.com>
>>
>> (file-attributes "u:/a/w32path/on/FAT32/formatted/removable/drive")
>> ;;;=>(t 1 0 0 (18948 65472) (18950 1330) (18950 1328) 0 "drwxrwxrwx" t
>> (7484788 . 1152) (25026 . 58322))
>>
>> ;;; why is `nth 4' (e.g. Last access time) of that list giving the
>> weird time-value on FAT32 drive?
>> (current-time-string (quote (18948 65472)))
>> ;;;=>"Sat May 09 00:00:00 2009"
>>
>> Whereas on a similarly directory created on an NTFS volume I get:
>> (file-attributes "c:/Documents and
>> Settings/path/on/a/w32path/NTFS/formatted/drive")
>> ;;;=>(t 1 1004 513 (18964 23862) (18957 32124) (18944 28179) 0
>> "drwxrwxrwx" nil 0 (45128 . 62390))
>>
>> (current-time-string (quote (18964 23862)))
>> ;;;=>"Wed May 20 15:42:46 2009"
>>
>> Am I missing something?
>
> I think you are missing the fact that on FAT32, the last-access time
> actually records only the date, with no time. Whereas on NTFS, it's a
> full-fledged time stamp.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
2009-05-21 2:15 ` MON KEY
@ 2009-05-21 3:28 ` Eli Zaretskii
2009-05-23 9:11 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2009-05-21 3:28 UTC (permalink / raw)
To: MON KEY; +Cc: emacs-devel
> Date: Wed, 20 May 2009 22:15:16 -0400
> From: MON KEY <monkey@sandpframing.com>
> Cc: emacs-devel@gnu.org
>
> While it is prob. unreasonable to assume Emacs document the vagaries
> of myriad filesystems (esp. non-free ones),
> when examining the docstring - e.g. `file-attributes' - it is not at
> all possible to deduce that _some_ file-systems will return correct
> but counter-intuitive results:
I will add some comment to the doc string.
> Are there other filesytems with similar un-features?
Only some other FAT-based ones (VFAT, for example), AFAIK.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
2009-05-21 3:28 ` Eli Zaretskii
@ 2009-05-23 9:11 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2009-05-23 9:11 UTC (permalink / raw)
To: monkey, emacs-devel
> Date: Thu, 21 May 2009 06:28:17 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> > Date: Wed, 20 May 2009 22:15:16 -0400
> > From: MON KEY <monkey@sandpframing.com>
> > Cc: emacs-devel@gnu.org
> >
> > While it is prob. unreasonable to assume Emacs document the vagaries
> > of myriad filesystems (esp. non-free ones),
> > when examining the docstring - e.g. `file-attributes' - it is not at
> > all possible to deduce that _some_ file-systems will return correct
> > but counter-intuitive results:
>
> I will add some comment to the doc string.
Done.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-23 9:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 19:46 w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp? MON KEY
2009-05-20 20:02 ` Eli Zaretskii
2009-05-21 2:15 ` MON KEY
2009-05-21 3:28 ` Eli Zaretskii
2009-05-23 9:11 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).