emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?


From: MON KEY
Subject: Re: w32 file-attributes on FAT32 volume vs.same on NTFS volume - bugp?
Date: Wed, 20 May 2009 22:15:16 -0400

> 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 <address@hidden> wrote:
>> Date: Wed, 20 May 2009 15:46:19 -0400
>> From: MON KEY <address@hidden>
>>
>> (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.
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]