public void editFile(int changeListId, File file) throws IOException {
try {
List<IFileSpec> fileSpecs = FileSpecBuilder.makeFileSpecList(file.getAbsolutePath());
List<IFileSpec> fileSpecsResult = client.editFiles(fileSpecs, false, false, changeListId, null);
for (IFileSpec fileSpec : fileSpecsResult) {
FileSpecOpStatus status = fileSpec.getOpStatus();
if (!FileSpecOpStatus.VALID.equals(status) && !FileSpecOpStatus.INFO.equals(status)) {
String statusMessage = fileSpec.getStatusMessage();
throw new IOException("Failed opening file for editing: : '" + statusMessage + "'");
}
}