Class FileSystem
- All Implemented Interfaces:
IFileSystem,IAdaptable
org.eclipse.core.filesystem.filesystems
extension point.
On creation, the setInitializationData method is called with
any parameter data specified in the declaring plug-in's manifest.
Clients may subclass this class.
- Since:
- org.eclipse.core.filesystem 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis is the default implementation ofIFileSystem.attributes().booleanThis is the default implementation ofIFileSystem.canDelete().booleancanWrite()This is the default implementation ofIFileSystem.canWrite().fetchFileTree(IFileStore root, IProgressMonitor monitor) Returns a file tree containing information about the complete sub-tree rooted at the given store.fromLocalFile(File file) Returns the file store in this file system corresponding to the given local file.final StringReturns the URI scheme of this file system.abstract IFileStoreSubclasses must implement this method to satisfy the contract ofIFileSystem.getStore(URI).This is the default implementation ofIFileSystem.getStore(IPath).final voidinitialize(String aScheme) Initializes this file system instance with the provided scheme.booleanThis is the default implementation ofIFileSystem.isCaseSensitive().Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Constructor Details
-
FileSystem
public FileSystem()Creates a new file system instance.
-
-
Method Details
-
attributes
public int attributes()This is the default implementation ofIFileSystem.attributes(). This implementation always returns0. Subclasses may override this method.- Specified by:
attributesin interfaceIFileSystem- Returns:
- The attributes supported by this file system
- See Also:
-
canDelete
public boolean canDelete()This is the default implementation ofIFileSystem.canDelete(). This implementation always returnsfalse. Subclasses may override this method.- Specified by:
canDeletein interfaceIFileSystem- Returns:
trueif this file system supports deletion, andfalseotherwise.- See Also:
-
canWrite
public boolean canWrite()This is the default implementation ofIFileSystem.canWrite(). This implementation always returnsfalse. Subclasses may override this method.- Specified by:
canWritein interfaceIFileSystem- Returns:
trueif this file system allows modification, andfalseotherwise.- See Also:
-
getScheme
Description copied from interface:IFileSystemReturns the URI scheme of this file system.- Specified by:
getSchemein interfaceIFileSystem- Returns:
- the URI scheme of this file system.
-
getStore
This is the default implementation ofIFileSystem.getStore(IPath). This implementation forwards toIFileSystem.getStore(URI), assuming that the provided path corresponds to the path component of the URI for the file store.Subclasses may override this method. If it is not possible to create a file store corresponding to the provided path for this file system, a file store belonging to the null file system should be returned
- Specified by:
getStorein interfaceIFileSystem- Parameters:
path- A path to a file store within the scheme of this file system.- Returns:
- A handle to a file store in this file system
- See Also:
-
getStore
Subclasses must implement this method to satisfy the contract ofIFileSystem.getStore(URI). If it is not possible to create a file store corresponding to the provided URI for this file system, a file store belonging to the null file system should be returned- Specified by:
getStorein interfaceIFileSystem- Parameters:
uri- The URI of the file store to return.- Returns:
- A handle to a file store in this file system
-
fetchFileTree
Returns a file tree containing information about the complete sub-tree rooted at the given store. Returnsnullif this file system does not support the creation of such file trees.A file tree accurately represents the state of a portion of a file system at the time it is created, but it is never updated. Clients using a file tree must tolerate the fact that the actual file system contents may change after the tree is generated.
This default implementation always returns
null. Subclasses that can efficiently provide anIFileTreerooted at the given file store should override.- Specified by:
fetchFileTreein interfaceIFileSystem- Parameters:
root- The store to use as the root of the file treemonitor- a progress monitor, ornullif progress reporting and cancellation are not desired- Returns:
- an
IFileTreecontaining the sub-tree of the given store, ornull - Throws:
CoreException- if fails.- See Also:
-
fromLocalFile
Returns the file store in this file system corresponding to the given local file. Returnsnullif this file system cannot provide anIFileStorecorresponding to a local file.This default implementation always returns
null. Subclasses may override to provide a concrete mapping from local files to an IFileStore in their file system.- Specified by:
fromLocalFilein interfaceIFileSystem- Parameters:
file- The file to be converted- Returns:
- The
IFileStorecorresponding to the given file, ornull - See Also:
-
initialize
Initializes this file system instance with the provided scheme.This method is called by the platform immediately after the file system instance is created. This method must not be called by clients.
- Parameters:
aScheme- The scheme of the file system.
-
isCaseSensitive
public boolean isCaseSensitive()This is the default implementation ofIFileSystem.isCaseSensitive(). This implementation always returnstrue. Subclasses may override this method.- Specified by:
isCaseSensitivein interfaceIFileSystem- Returns:
trueif this file system is case sensitive, andfalseotherwise.- See Also:
-