简体   繁体   中英

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:

1) never run any standard check disk utilities otherwise you get it wrong

2) you have to implement own delete operation to remove records from directory which points to the same item that you delete.

UPD: answer consider that question has 'can be modified' approach

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. Disk block numbers of all files are kept in a File Allocation Table (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. It does not support symbolic links either, though it could have. However, Windows supports shortcuts that are similar to symbolic links.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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