我正在做一个关于日志结构文件系统的项目,我正在做这个项目的中期,已经创建了正常的文件和目录的索引节点,现在我想在符号链接上工作。
这是我的inode的结构。
int8_t is_active;
/* inode no. of the file */
uint16_t inode_number;
/* the most up-to-date version id */
uint8_t latest_version_id;
/* Details about the direct block */
BlockInfo direct_block[4];
/* Details about the indirect block */
BlockInfo indirect_block;
/* The type, permissions, etc. */
unsigned long inode_mode;
/* The user id */
//unsigned short uid;
/* The group id */
//unsigned short gid;
/* The number of links to the inode */
unsigned short number_of_links;
/* The size of the file, in bytes.
* If it is a directory file, this will contain the number of
* immediate children in the directory.
*
* If it is a regular file, it will contain the actual file size*/
unsigned long int file_size;
/* The number of blocks used by the inode */
unsigned long number_of_blocks;
/* The creation time of the file */
struct timeval creation_time;
/* The modification time of the file */
struct timeval modification_time;
struct timeval access_time;谁能帮我创建符号链接。
发布于 2013-02-23 05:44:21
符号链接是一个常规文件,其中包含指向目标的路径名。使用模式位使文件系统代码读取链接,并在打开、创建、取消链接等时执行重定向。
https://stackoverflow.com/questions/13213672
复制相似问题