简体   繁体   English

FAT文件系统是否支持对文件的多个引用?

[英]Can a FAT filesystem support multiple references to a file?

是否可以修改基于FAT的文件系统,以通过在目录表条目中使用相同的FAT块序列来支持对文件的多个引用(即别名)?

No because then when any reference was deleted, the file would be added to free space and possibly reused. 不,因为当删除任何引用时,该文件将被添加到可用空间并可能被重用。 This would result in two different files sharing space with any write to one corrupting the other. 这将导致两个不同的文件共享空间,任何写入一个会破坏另一个。

This could work if the file system was immutable. 如果文件系统是不可变的,这可能会起作用。 For example if it was written to an unwritable medium. 例如,如果它被写入不可写的媒体。

Surely, you can have directory items points to same FAT records, but there are two things you should keep in mind: 当然,您可以将目录项指向相同的FAT记录,但是您应该记住两件事:

1) never run any standard check disk utilities otherwise you get it wrong 1)永远不要运行任何标准的检查磁盘实用程序,否则你会弄错

2) you have to implement own delete operation to remove records from directory which points to the same item that you delete. 2)您必须实现自己的删除操作,以从目录中删除指向您删除的同一项目的记录。

UPD: answer consider that question has 'can be modified' approach UPD:回答认为这个问题有“可修改”的方法

The FAT File System stores all information about a file in a single structure inside a directory, except the addresses of disk blocks that contain file data. FAT文件系统将有关文件的所有信息存储在目录内的单个结构中,但包含文件数据的磁盘块的地址除外。 Disk block numbers of all files are kept in a File Allocation Table (FAT). 所有文件的磁盘块编号都保存在文件分配表(FAT)中。

Since the link information and file container information are bound together in a single structure , FAT file system does not support multiple links to a single file. 由于链接信息和文件容器信息在单个结构中绑定在一起 ,因此FAT文件系统不支持到单个文件的多个链接。 It does not support symbolic links either, though it could have. 它也不支持符号链接,尽管它可能有。 However, Windows supports shortcuts that are similar to symbolic links. 但是,Windows支持与符号链接类似的快捷方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM