Package com.perforce.p4java.core.file

Examples of com.perforce.p4java.core.file.FileSpecOpStatus


    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 + "'");
                }
            }
View Full Code Here

TOP

Related Classes of com.perforce.p4java.core.file.FileSpecOpStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.