1 11 package org.eclipse.core.filesystem.provider; 12 13 import java.net.URI ; 14 import java.net.URISyntaxException ; 15 import org.eclipse.core.filesystem.*; 16 import org.eclipse.core.runtime.*; 17 18 31 public abstract class FileSystem extends PlatformObject implements IFileSystem { 32 private String scheme; 33 34 37 public FileSystem() { 38 super(); 39 } 40 41 49 public int attributes() { 50 return 0; 51 } 52 53 62 public boolean canDelete() { 63 return false; 64 } 65 66 75 public boolean canWrite() { 76 return false; 77 } 78 79 83 public final String getScheme() { 84 return scheme; 85 } 86 87 103 public IFileStore getStore(IPath path) { 104 try { 105 return getStore(new URI (scheme, path.toString(), null)); 106 } catch (URISyntaxException e) { 107 return EFS.getNullFileSystem().getStore(path); 108 } 109 } 110 111 117 public abstract IFileStore getStore(URI uri); 118 119 126 public IFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor) { 127 return null; 128 } 129 130 137 public IFileStore fromLocalFile(java.io.File file) { 138 return null; 139 } 140 141 150 public final void initialize(String aScheme) { 151 if (aScheme == null) 152 throw new NullPointerException (); 153 if (this.scheme != null) 155 throw new IllegalStateException ("File system already initialized"); this.scheme = aScheme; 157 } 158 159 167 public boolean isCaseSensitive() { 168 return true; 169 } 170 } 171 | Popular Tags |