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