emacs-devel
[Top][All Lists]
Advanced

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

Re: Ido mode on Windows: please turn off cache


From: Herbert Euler
Subject: Re: Ido mode on Windows: please turn off cache
Date: Wed, 31 Jan 2007 21:14:31 +0800

I got another idea of dealing with this.  Please think about whether
it is appropriate.

I have tested it again to be sure, that if the file system is NTFS the
modification time will be updated, while if the file system is FAT32
it will not.  Again, I did not check the FAT file system.  If this is
the key to the problem, we can check some other infomation in addition
to the modification time, to determine whether a directory is updated.

The `file-attributes' function returns a list, the third and fourth
element of which are file uid and file gid.  These two fields are
different on NTFS and FAT32.  Please take a comparison:

   (file-attributes "c:/")   ;; On FAT32 file system
        ==> (t 1 0 0 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (7756 . 6145))

   (file-attributes "c:/")   ;; On NTFS file system
        ==> (t 1 5 5 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (9440 . 10983))

Note that the uid and gid are different for the two file systems.  I
have tested many logical drives, all FAT32 drives come with (0 0), and
all NTFS drives come with (5 5).

What about this idea?  If the OS is w32, and if the uid and gid are (0
0), it means reading from FAT32 file system, so the cache should be
disabled; if they are (5 5), it means reading from NTFS file system,
then the cache should be enabled?

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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