//byte array holding the contents of the file
byte[] contents = File.ReadAllBytes(path);
file.CheckOut();
file.SaveBinary(contents);
file.CheckIn("New version");