1 17 18 package org.alfresco.filesys.smb.server.repo.pseudo; 19 20 import java.io.File ; 21 22 import org.alfresco.filesys.server.filesys.FileAttribute; 23 import org.alfresco.filesys.server.filesys.FileInfo; 24 import org.alfresco.filesys.server.filesys.NetworkFile; 25 26 34 public abstract class PseudoFile 35 { 36 38 protected static long _creationDateTime = System.currentTimeMillis(); 39 40 42 private String m_fileName; 43 44 46 private int m_fileFlags = FileAttribute.ReadOnly; 47 48 50 protected FileInfo m_fileInfo; 51 52 57 protected PseudoFile(String name) 58 { 59 m_fileName = name; 60 } 61 62 68 protected PseudoFile(String name, int flags) 69 { 70 m_fileName = name; 71 m_fileFlags = flags; 72 } 73 74 79 public final String getFileName() 80 { 81 return m_fileName; 82 } 83 84 89 public final int getAttributes() 90 { 91 return m_fileFlags; 92 } 93 94 99 public abstract FileInfo getFileInfo(); 100 101 107 public abstract NetworkFile getFile(String netPath); 108 109 114 public String toString() 115 { 116 StringBuilder str = new StringBuilder (); 117 118 str.append("["); 119 str.append(getFileName()); 120 str.append(","); 121 str.append(getFileInfo()); 122 str.append("]"); 123 124 return str.toString(); 125 } 126 } 127 | Popular Tags |