Unlink a file from FUSE virtual file system

509 views Asked by At

I am new to FUSE. I created a virtual file system via FUSE. I can read a file with the command:

cat /deneme/club/basketball/students/student1

and it returns the value of file correctly:

"111111111"

However, I want to delete same file from file system. I use unlink system call:

unlink /deneme/club/basketball/students/student1

This code does not give any error but when I called the cat for the same file, it prints the same value:

"111111111"

What should i do to remove file from file system. Thanks

This is how i declared the unlink operation

1

There are 1 answers

0
Moses On

You have to use the system call unlink and passing the file path as a parameter to the system call.

unlink(file_path);