1 19 package org.netbeans.lib.cvsclient.command; 20 21 import java.io.*; 22 23 29 public class DefaultFileInfoContainer extends FileInfoContainer { 30 31 public static final String PERTINENT_STATE = "Y"; public static final String MERGED_FILE = "G"; private File file; 34 35 private String type; 36 37 public DefaultFileInfoContainer() { 38 } 39 40 43 public File getFile() { 44 return file; 45 } 46 47 50 public boolean isDirectory() { 51 File file = getFile(); 52 if (file == null) { 53 return false; 54 } 55 return file.isDirectory(); 56 } 57 58 61 public void setFile(File file) { 62 this.file = file; 63 } 64 65 73 public String getType() { 74 return type; 75 } 76 77 80 public void setType(String type) { 81 this.type = type; 82 } 83 84 87 public String toString() { 88 StringBuffer buffer = new StringBuffer (); 89 buffer.append(type); 90 buffer.append(" "); if (isDirectory()) { 92 buffer.append("Directory "); } 94 buffer.append(file != null ? file.getAbsolutePath() 95 : "null"); return buffer.toString(); 97 } 98 } 99 | Popular Tags |