impure functioncompareFilesAndMove

Overwrites a file with another if they differ.

Information

Compares newFile and oldFile. If they differ, overwrite oldFile with newFile

Basically: test -f ../oldFile && cmp newFile oldFile || mv newFile oldFile

Inputs

TypeNameDefaultDescription
StringnewFile
StringoldFile

Outputs

TypeNameDefaultDescription
Booleansuccess