title: Implementing rename in fuse file system
body: <p>I'm trying to implement an in-memory file system using fuse. The rename function accepts 'from' and 'to' parameters.</p>
  
  <p>When I tried doing this on bash,
  <strong>mv file1 file2</strong>,
  it internally calls rename function (I used the -d option to check it). </p>
  
  <p>When i try to rename the function in the GUI, it again calls the rename function.</p>
  
  <p>But if file2 is an already existing file, <strong>mv</strong> 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 <strong>rename</strong> function with no distinction.</p>