Class EFS
- Since:
- org.eclipse.core.filesystem 1.0
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Option flag constant (value 1 <<0) indicating a file opened for appending data to the end.static final int
Attribute constant (value 1 <<3) indicating that a file is an archive.static final int
Attribute constant (value 1 <<2) indicating that a file is a executable.static final int
Attribute constant (value 1 <<27) indicating that users in file's group have an execute permission.static final int
Attribute constant (value 1 <<25) indicating that users in file's group have a read permission.static final int
Attribute constant (value 1 <<26) indicating that users in file's group have a write permission.static final int
Attribute constant (value 1 <<4) indicating that a file is hidden.static final int
Attribute constant (value 1 <<21) indicating that a file is marked with immutable flag.static final int
Attribute constant (value 1 <<6) for a string attribute indicating the target file name of a symbolic link.static final int
Attribute constant (value 1 <<30) indicating that other users have an execute permission.static final int
Attribute constant (value 1 <<28) indicating that other users have a read permission.static final int
Attribute constant (value 1 <<29) indicating that other users have a write permission.static final int
Attribute constant (value 1 <<24) indicating that file's owner has an execute permission.static final int
Attribute constant (value 1 <<22) indicating that a file's owner has a read permission.static final int
Attribute constant (value 1 <<23) indicating that file's owner has a write permission.static final int
Attribute constant (value 1 <<1) indicating that a file is read only.static final int
Attribute constant (value 1 <<5) indicating that a file is a symbolic link.static final int
Option flag constant (value 1 <<12) indicating that a cached representation of a file should be returned.static final int
Status code constant (value 280) indicating that the file system failed to authenticate the request.static final int
Status code constant (value 275) indicating this file system is not case sensitive and a file that differs only in case unexpectedly exists on the file system.static final int
Status code constant (value 273) indicating an error occurred while deleting from the file system.static final int
Status code constant (value 268) indicating a store unexpectedly exists on the file system.static final int
Status code constant (value 566) indicating an internal error has occurred.static final int
Status code constant (value 270) indicating the file system location for a store could not be computed.static final int
Status code constant (value 269) indicating a store unexpectedly does not exist on the file system.static final int
Status code constant (value 277) indicating that the parent file in the file system is marked as read-only.static final int
Status code constant (value 271) indicating an error occurred while reading from the file system.static final int
Status code constant (value 279) indicating that the file in the file system is marked as read-only.static final int
Status code constant (value 272) indicating an error occurred while writing to the file system.static final int
Status code constant (value 276) indicating a file exists in the file system but is not of the expected type (file instead of directory, or vice-versa).static final int
A constant known to be zero (0), used in operations which take bit flags to indicate that "no bits are set".static final int
Option flag constant (value 1 <<1) indicating that existing files may be overwritten.static final String
The unique identifier constant (value "org.eclipse.core.filesystem
") of the Core file system plug-in.static final String
The simple identifier constant (value "filesystems
") of the extension point of the Core file system plug-in where plug-ins declare file system implementations.static final String
Scheme constant (value "file") indicating the local file system scheme.static final String
Scheme constant (value "null") indicating the null file system scheme.static final int
Option flag constant (value 1 <<10) indicating that a file's attributes should be updated.static final int
Option flag constant (value 1 <<11) indicating that a file's last modified time should be updated.static final int
Option flag constant (value 1 <<2) indicating that an operation acts on a single file or directory, and not its parents or children. -
Method Summary
Modifier and TypeMethodDescriptionstatic IFileInfo
Creates an empty file information object.static IFileSystem
getFileSystem
(String scheme) Returns a file system corresponding to the given scheme.static IFileSystem
Returns the local file system.static IFileSystem
Returns the null file system.static IFileStore
Returns the file store corresponding to the provided URI.
-
Field Details
-
PI_FILE_SYSTEM
The unique identifier constant (value "org.eclipse.core.filesystem
") of the Core file system plug-in.- See Also:
-
PT_FILE_SYSTEMS
The simple identifier constant (value "filesystems
") of the extension point of the Core file system plug-in where plug-ins declare file system implementations.- See Also:
-
NONE
public static final int NONEA constant known to be zero (0), used in operations which take bit flags to indicate that "no bits are set". This value is also used as a default value in cases where a file system attribute cannot be computed. -
APPEND
public static final int APPENDOption flag constant (value 1 <<0) indicating a file opened for appending data to the end. -
OVERWRITE
public static final int OVERWRITEOption flag constant (value 1 <<1) indicating that existing files may be overwritten. -
SHALLOW
public static final int SHALLOWOption flag constant (value 1 <<2) indicating that an operation acts on a single file or directory, and not its parents or children. -
SET_ATTRIBUTES
public static final int SET_ATTRIBUTESOption flag constant (value 1 <<10) indicating that a file's attributes should be updated. -
SET_LAST_MODIFIED
public static final int SET_LAST_MODIFIEDOption flag constant (value 1 <<11) indicating that a file's last modified time should be updated. -
CACHE
public static final int CACHEOption flag constant (value 1 <<12) indicating that a cached representation of a file should be returned. -
ATTRIBUTE_READ_ONLY
public static final int ATTRIBUTE_READ_ONLYAttribute constant (value 1 <<1) indicating that a file is read only. -
ATTRIBUTE_IMMUTABLE
public static final int ATTRIBUTE_IMMUTABLEAttribute constant (value 1 <<21) indicating that a file is marked with immutable flag.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OWNER_READ
public static final int ATTRIBUTE_OWNER_READAttribute constant (value 1 <<22) indicating that a file's owner has a read permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OWNER_WRITE
public static final int ATTRIBUTE_OWNER_WRITEAttribute constant (value 1 <<23) indicating that file's owner has a write permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OWNER_EXECUTE
public static final int ATTRIBUTE_OWNER_EXECUTEAttribute constant (value 1 <<24) indicating that file's owner has an execute permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_GROUP_READ
public static final int ATTRIBUTE_GROUP_READAttribute constant (value 1 <<25) indicating that users in file's group have a read permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_GROUP_WRITE
public static final int ATTRIBUTE_GROUP_WRITEAttribute constant (value 1 <<26) indicating that users in file's group have a write permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_GROUP_EXECUTE
public static final int ATTRIBUTE_GROUP_EXECUTEAttribute constant (value 1 <<27) indicating that users in file's group have an execute permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OTHER_READ
public static final int ATTRIBUTE_OTHER_READAttribute constant (value 1 <<28) indicating that other users have a read permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OTHER_WRITE
public static final int ATTRIBUTE_OTHER_WRITEAttribute constant (value 1 <<29) indicating that other users have a write permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_OTHER_EXECUTE
public static final int ATTRIBUTE_OTHER_EXECUTEAttribute constant (value 1 <<30) indicating that other users have an execute permission.- Since:
- org.eclipse.core.filesystem 1.3
- See Also:
-
ATTRIBUTE_EXECUTABLE
public static final int ATTRIBUTE_EXECUTABLEAttribute constant (value 1 <<2) indicating that a file is a executable. -
ATTRIBUTE_ARCHIVE
public static final int ATTRIBUTE_ARCHIVEAttribute constant (value 1 <<3) indicating that a file is an archive. -
ATTRIBUTE_HIDDEN
public static final int ATTRIBUTE_HIDDENAttribute constant (value 1 <<4) indicating that a file is hidden. -
ATTRIBUTE_SYMLINK
public static final int ATTRIBUTE_SYMLINKAttribute constant (value 1 <<5) indicating that a file is a symbolic link.If this attribute is
true
for a givenIFileInfo
instance, a String value may be associated with the attribute holding the symbolic link target. This link target can be retrieved withIFileInfo.getStringAttribute(int)
with attribute typeATTRIBUTE_LINK_TARGET
.Symbolic links are handled transparently, as implemented by the underlying operating system. This means, that all other attributes of a
IFileInfo
apply to the link target instead of the link. Reading or writing a file, or changing attributes applies to the link target and not the link itself. In case a symbolic link points to another symbolic link, the chain of links is transparently followed and operations apply to the actual file or directory being referenced by the chain of symbolic links.Broken symbolic links (which do not reference any valid file or directory) are being returned by
IFileStore.childInfos(int, IProgressMonitor)
, butIFileInfo.exists()
returnsfalse
for these. Operations like reading or writing on broken symbolic links throw a "file not found" exception.- Since:
- org.eclipse.core.filesystem 1.1
- See Also:
-
ATTRIBUTE_LINK_TARGET
public static final int ATTRIBUTE_LINK_TARGETAttribute constant (value 1 <<6) for a string attribute indicating the target file name of a symbolic link.Note that setting the link target attribute does not cause a symbolic link to be created, or changed to link to a different file. Rather, this attribute is set by file system implementations based on the current state of a link.
- Since:
- org.eclipse.core.filesystem 1.1
- See Also:
-
SCHEME_FILE
Scheme constant (value "file") indicating the local file system scheme.- See Also:
-
SCHEME_NULL
Scheme constant (value "null") indicating the null file system scheme.- See Also:
-
ERROR_EXISTS
public static final int ERROR_EXISTSStatus code constant (value 268) indicating a store unexpectedly exists on the file system. Severity: error. Category: file system.- See Also:
-
ERROR_NOT_EXISTS
public static final int ERROR_NOT_EXISTSStatus code constant (value 269) indicating a store unexpectedly does not exist on the file system. Severity: error. Category: file system.- See Also:
-
ERROR_NO_LOCATION
public static final int ERROR_NO_LOCATIONStatus code constant (value 270) indicating the file system location for a store could not be computed. Severity: error. Category: file system.- See Also:
-
ERROR_READ
public static final int ERROR_READStatus code constant (value 271) indicating an error occurred while reading from the file system. Severity: error. Category: file system.- See Also:
-
ERROR_WRITE
public static final int ERROR_WRITEStatus code constant (value 272) indicating an error occurred while writing to the file system. Severity: error. Category: file system.- See Also:
-
ERROR_DELETE
public static final int ERROR_DELETEStatus code constant (value 273) indicating an error occurred while deleting from the file system. Severity: error. Category: file system.- See Also:
-
ERROR_CASE_VARIANT_EXISTS
public static final int ERROR_CASE_VARIANT_EXISTSStatus code constant (value 275) indicating this file system is not case sensitive and a file that differs only in case unexpectedly exists on the file system. Severity: error. Category: file system.- See Also:
-
ERROR_WRONG_TYPE
public static final int ERROR_WRONG_TYPEStatus code constant (value 276) indicating a file exists in the file system but is not of the expected type (file instead of directory, or vice-versa). Severity: error. Category: file system.- See Also:
-
ERROR_PARENT_READ_ONLY
public static final int ERROR_PARENT_READ_ONLYStatus code constant (value 277) indicating that the parent file in the file system is marked as read-only. Severity: error. Category: file system.- See Also:
-
ERROR_READ_ONLY
public static final int ERROR_READ_ONLYStatus code constant (value 279) indicating that the file in the file system is marked as read-only. Severity: error. Category: file system.- See Also:
-
ERROR_AUTH_FAILED
public static final int ERROR_AUTH_FAILEDStatus code constant (value 280) indicating that the file system failed to authenticate the request. This can be caused by missing or incorrect authentication information being supplied. Severity: error. Category: file system.- Since:
- 1.4
- See Also:
-
ERROR_INTERNAL
public static final int ERROR_INTERNALStatus code constant (value 566) indicating an internal error has occurred. Severity: error. Category: internal.- See Also:
-
-
Method Details
-
createFileInfo
Creates an empty file information object. The resulting information will represent a non-existent file with no name and no attributes set.- Returns:
- an empty file information object.
- See Also:
-
getFileSystem
Returns a file system corresponding to the given scheme.- Parameters:
scheme
- The file system URI scheme- Returns:
- The corresponding file system for the given scheme
- Throws:
CoreException
- if this method fails. Reasons include:- There is no registered file system for the given URI scheme.
- There was a failure initializing the file system.
-
getLocalFileSystem
Returns the local file system.- Returns:
- The local file system
-
getNullFileSystem
Returns the null file system. The null file system can be used to represent a non-existent or unresolved file system. An example of a null file system is a file system whose location is relative to an undefined variable, or a system whose scheme is unknown.Basic handle-based queries can be performed on the null file system, but all operations that actually require file system access will fail.
- Returns:
- The null file system
-
getStore
Returns the file store corresponding to the provided URI.- Parameters:
uri
- The URI of the file store to return- Returns:
- The file store
- Throws:
CoreException
- if this method fails. Reasons include:- There is no registered file system for the given URI scheme.
- The URI syntax was not in the appropriate form for that scheme.
- There was a failure initializing the file system.
-