radumarias / rencfs

An encrypted file system written in Rust that is mounted with FUSE on Linux. It can be used to create encrypted directories
Apache License 2.0
117 stars 25 forks source link

Implement FUSE hardlink #230

Open radumarias opened 1 week ago

radumarias commented 1 week ago

https://chatgpt.com/share/6735c9c5-8c80-8003-a6e8-f56c84120216

specs: https://github.com/libfuse/libfuse/blob/master/include/fuse.h#L399

You need to implement https://github.com/Sherlock-Holo/fuse3/blob/17eae92592c4aab5a9dd30d5b09a92987c0d4823/src/raw/filesystem.rs#L127 in https://github.com/radumarias/rencfs/blob/main/src/mount/linux.rs#L260 and call similar names function from https://github.com/radumarias/rencfs/blob/main/src/encryptedfs.rs#L548 to implement the actual functionality.

How to implement when creating a hardlink to a file you save in the file content in contents folder the inode to which it points. When accessing this hardlink you will actually forward all operations to the file in the inode.

For now allow src to only be file, as it's easier to implement, we'll handle that case in the future. Meaning you can have dir > dir.