I'm trying to implement an in-memory file system using fuse. The rename function accepts 'from' and 'to' parameters.
When I tried doing this on bash, mv file1 file2, it internally calls rename function (I used the -d option to check it).
When i try to rename the function in the GUI, it again calls the rename function.
But if file2 is an already existing file, mv command overwrites it whereas the GUI prevents me from renaming the file. How do I enforce this constraint because internally both these actions call the rename function with no distinction.