1 22 package org.netbeans.lib.cvsclient.response; 23 24 import java.io.*; 25 26 import org.netbeans.lib.cvsclient.util.*; 27 28 34 class CopyFileResponse implements Response { 35 42 public void process(LoggedDataInputStream dis, ResponseServices services) 43 throws ResponseException { 44 try { 45 String localPath = dis.readLine(); 47 String repositoryPath = dis.readLine(); 49 String newname = dis.readLine(); 51 final String absPath = services.convertPathname(localPath, repositoryPath); 53 if (services.getGlobalOptions().isExcluded(new File(absPath))) { 54 return; 55 } 56 if (!services.getGlobalOptions().isDoNoChanges()) { 57 services.removeLocalFile(new File(new File(absPath).getParentFile(), newname).getAbsolutePath()); 58 services.renameLocalFile(absPath, newname); 59 } 60 } 61 catch (EOFException ex) { 62 throw new ResponseException(ex, ResponseException.getLocalMessage("CommandException.EndOfFile", null)); } 64 catch (IOException ex) { 65 throw new ResponseException(ex); 66 } 67 } 68 69 74 public boolean isTerminalResponse() { 75 return false; 76 } 77 } 78 | Popular Tags |