public interface IFileSystem extends IAdaptable
File systems are registered using the "filesystems" extension point.
EFS.getFileSystem(String)
FileSystem
rather than implementing
this interface directly.Modifier and Type | Method and Description |
---|---|
int |
attributes()
Returns the file attributes supported by this file system.
|
boolean |
canDelete()
Returns whether this file system supports deletion
|
boolean |
canWrite()
Returns whether this file system supports modification.
|
IFileTree |
fetchFileTree(IFileStore root,
IProgressMonitor monitor)
Returns a file tree containing information about the complete sub-tree
rooted at the given store.
|
IFileStore |
fromLocalFile(File file)
Returns the file store in this file system corresponding to the
given local file.
|
String |
getScheme()
Returns the URI scheme of this file system.
|
IFileStore |
getStore(IPath path)
Returns a handle to a file store in this file system.
|
IFileStore |
getStore(URI uri)
Returns a handle to a file store in this file system.
|
boolean |
isCaseSensitive()
Returns whether this file system is case sensitive.
|
getAdapter
int attributes()
EFS.ATTRIBUTE_*
constants.boolean canDelete()
true
if this file system allows deletion
of files and directories, and false
otherwiseboolean canWrite()
true
if this file system allows modification
of files and directories, and false
otherwiseIFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor) throws CoreException
null
if 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.
root
- The store to use as the root of the file treemonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desiredIFileTree
containing the sub-tree of the given store,
or null
CoreException
- if this method fails. Reasons include:
IFileTree
IFileStore fromLocalFile(File file)
null
if this file system
cannot provide an IFileStore
corresponding to a local file.file
- The file to be convertedIFileStore
corresponding to the given file, or null
IFileStore.toLocalFile(int, IProgressMonitor)
String getScheme()
IFileStore getStore(IPath path)
This is a convenience method for file systems that do not make use
of the authority URI
component, such as a host or user
information. The provided path argument is interpreted as the path component
of the file system's URI
. For example, this method can
be used to safely navigate within the local file system.
path
- A path to a file store within the scheme of this file system.EFS.getLocalFileSystem()
IFileStore getStore(URI uri)
uri
- The URI of the file store to return.boolean isCaseSensitive()
true
if this file system is case sensitive, and
false
otherwise.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.