Class LocalFileStorage
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage
- All Implemented Interfaces:
IStorage,IAdaptable
Implementation of storage for a local file
(
java.io.File).
This class may be instantiated.
- Since:
- 3.0
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalFileStorage(File file) Constructs and returns storage for the given file. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns an open input stream on the contents of this storage.getFile()Returns the file associated with this storageReturns the full path of this storage.getName()Returns the name of this storage.inthashCode()booleanReturns whether this storage is read-only.Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Constructor Details
-
LocalFileStorage
Constructs and returns storage for the given file.- Parameters:
file- a local file
-
-
Method Details
-
getContents
Description copied from interface:IStorageReturns an open input stream on the contents of this storage. The caller is responsible for closing the stream when finished.- Specified by:
getContentsin interfaceIStorage- Returns:
- an input stream containing the contents of this storage
- Throws:
CoreException- if the contents of this storage could not be accessed. See any refinements for more information.
-
getFullPath
Description copied from interface:IStorageReturns the full path of this storage. The returned value depends on the implementor/extender. A storage need not have a path.- Specified by:
getFullPathin interfaceIStorage- Returns:
- the path related to the data represented by this storage or
nullif none.
-
getName
Description copied from interface:IStorageReturns the name of this storage. The name of a storage is synonymous with the last segment of its full path though if the storage does not have a path, it may still have a name. -
isReadOnly
public boolean isReadOnly()Description copied from interface:IStorageReturns whether this storage is read-only.- Specified by:
isReadOnlyin interfaceIStorage- Returns:
trueif this storage is read-only
-
getFile
Returns the file associated with this storage- Returns:
- file
-
equals
-
hashCode
public int hashCode()
-