file - C++: Rename instead of Delete & Copy when using Sync -


currently have following part code in sync:

...  int index = file.find(remotedir); if(index >= 0){     file.erase(index, remotedir.size());     file.insert(index, localdir); }  ...  // uses put command on file 

now want following instead:

  • if file same before, except rename, don't use put command, use rename command instead

tl;dr: there way check whether file same before except rename occurred? way compare both files (with different names) see if same?

check md5sum, if different file modified. md5 check sum of renamed file remain same. change in content of file give different value.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -