|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.core.filesystem.provider.FileSystem
The common superclass for all file system implementations. Instances of this class are provided using the 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.
Constructor Summary | |
---|---|
FileSystem()
Creates a new file system instance. |
Method Summary | |
---|---|
int |
attributes()
This is the default implementation of IFileSystem.attributes() .
|
boolean |
canDelete()
This is the default implementation of IFileSystem.canDelete() .
|
boolean |
canWrite()
This is the default implementation of IFileSystem.canWrite() .
|
IFileTree |
fetchFileTree(IFileStore root,
IProgressMonitor monitor)
The default implementation of IFileSystem.fetchFileTree(IFileStore, IProgressMonitor) .
|
IFileStore |
fromLocalFile(File file)
Returns the file store in this file system corresponding to the given local file. Returns null if this file system
cannot provide an IFileStore corresponding to a local file.
This default implementation always returns null .
|
String |
getScheme()
Returns the URI scheme of this file system. |
IFileStore |
getStore(IPath path)
This is the default implementation of IFileSystem.getStore(IPath) .
|
abstract IFileStore |
getStore(URI uri)
Subclasses must implement this method to satisfy the contract of IFileSystem.getStore(URI) . |
void |
initialize(String aScheme)
Initializes this file system instance with the provided scheme. |
boolean |
isCaseSensitive()
This is the default implementation of IFileSystem.isCaseSensitive() .
|
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
public FileSystem()
Method Detail |
public int attributes()
IFileSystem.attributes()
.
This implementation always returns 0
.
Subclasses may override this method.
attributes
in interface IFileSystem
IFileSystem.attributes()
public boolean canDelete()
IFileSystem.canDelete()
.
This implementation always returns false
.
Subclasses may override this method.
canDelete
in interface IFileSystem
true
if this file system supports deletion, and
false
otherwise.IFileSystem.canDelete()
public boolean canWrite()
IFileSystem.canWrite()
.
This implementation always returns false
.
Subclasses may override this method.
canWrite
in interface IFileSystem
true
if this file system allows modification, and
false
otherwise.IFileSystem.canWrite()
public final String getScheme()
IFileSystem
getScheme
in interface IFileSystem
public IFileStore getStore(IPath path)
IFileSystem.getStore(IPath)
.
This implementation forwards to IFileSystem.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
getStore
in interface IFileSystem
path
- A path to a file store within the scheme of this file system.
IFileSystem.getStore(IPath)
,
EFS.getNullFileSystem()
public abstract IFileStore getStore(URI uri)
IFileSystem.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
getStore
in interface IFileSystem
uri
- The URI of the file store to return.
public IFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor)
IFileSystem.fetchFileTree(IFileStore, IProgressMonitor)
.
This default implementation always returns null
. Subclasses
that can efficiently provide an IFileTree
rooted at the given file store
should override.
fetchFileTree
in interface IFileSystem
root
- The store to use as the root of the file treemonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
IFileTree
containing the sub-tree of the given store,
or null
IFileTree
public IFileStore fromLocalFile(File file)
null
if this file system
cannot provide an IFileStore
corresponding 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.
fromLocalFile
in interface IFileSystem
file
- The file to be converted
IFileStore
corresponding to the given file, or null
IFileStore.toLocalFile(int, IProgressMonitor)
public final void initialize(String aScheme)
This method is called by the platform immediately after the file system instance is created. This method must not be called by clients.
aScheme
- The scheme of the file system.public boolean isCaseSensitive()
IFileSystem.isCaseSensitive()
.
This implementation always returns true
. Subclasses may override this method.
isCaseSensitive
in interface IFileSystem
true
if this file system is case sensitive, and
false
otherwise.IFileSystem.isCaseSensitive()
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.