On 31/12/08 14:58, Bram Moolenaar wrote:
> Dominique Pelle wrote:
[...]
>> I think remembering that FAT file systems don't have the concept of
>> inodes, unlike Unix file systems, so stat() either leaves st_ino as  0,
>> or synthesizes a fake inode number.  I will try it later when I have time.
>
> Inodes must work on any file system.  It is a basic concept in Unix.  If
> st_ino doesn't have a valid value that you should not use that file
> system, many tools will not work.
>

FAT filesystems have the concept of "cluster number" which is an integer 
between 2 and (at most) 2^n-16 (I think) (where n=12, 16 or 32 depending 
on the FAT type) and representing the ordinal location on the partition 
(or diskette) of a block of data which must be allocated as a unit. The 
cluster size (as a number of physical records) is determined when the 
partition is formatted; it is usually 512 bytes times a power of 2. The 
directory entry for every file (or subdirectory) includes the number of 
its first cluster; the FAT (File Allocation Table) entry for every 
cluster on the partition holds either the number of the next cluster in 
the same file, or a code meaning that this is the last cluster of the 
file, that it is not allocated to any file, or that it is a known bad 
cluster. I'm not 100% sure what an "inode" means on Unix filesystems but 
I think this is the FAT equivalent.

Best regards,
Tony.
-- 
There is a theory which states that if ever anyone discovers exactly
what the Universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarre and
inexplicable.  There is another theory which states that this has
already happened.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui