public static DoFilesDiffer ( string file1, string file2 ) : bool | ||
file1 | string | |
file2 | string | |
return | bool |
public static bool DoFilesDiffer(string file1, string file2)
{
if (!File.Exists(file2))
return true;
if (File.Exists(file1) != File.Exists(file2))
return false;
var buffer1 = File.ReadAllBytes(file1);
var buffer2 = File.ReadAllBytes(file2);
if (buffer1.Length != buffer2.Length)
return true;
return !buffer1.SequenceEqual(buffer2);
}
ToolboxUpdater::DoFilesDiffer ( string directory1, string directory2, string filename ) : bool |