ISourceControlProvider: Revert if unchanged?

Is it possible to do the equivalent of p4 revert -a from C++ in the editor? I’m currently using ISourceControlProvider::Execute(ISourceControlOperation::Create(), FileName) to check out a file before writing it with FFileHelper::SaveStringToFile, but I’d like to avoid leaving the file checked out if there’s no change to the contents.

I could read the file and compare it before I check it out, but that’s somewhat inefficient, especially considering that Perforce already has an operation for reverting unchanged files.