public class JavaIOFileSystemSupport extends AbstractFileSystemSupport
Constructor and Description |
---|
JavaIOFileSystemSupport() |
Modifier and Type | Method and Description |
---|---|
void |
delete(Path path)
Deletes the file or folder the given path points to.
|
boolean |
exists(Path path) |
java.lang.String |
getCharset(Path path)
Returns the name of a charset to be used when decoding the contents of this
file into characters.
|
java.lang.Iterable<? extends Path> |
getChildren(Path path) |
java.io.InputStream |
getContentsAsStream(Path path)
Returns an open input stream on the contents of this file.
|
protected java.io.File |
getJavaIOFile(Path path) |
long |
getLastModification(Path path) |
Path |
getPath(org.eclipse.emf.ecore.resource.Resource res) |
com.google.inject.Provider<WorkspaceConfig> |
getProjectInformationProvider() |
boolean |
isFile(Path path) |
boolean |
isFolder(Path path) |
void |
mkdir(Path path)
Creates a directory for the given path and all its parents if necessary.
|
void |
setContentsAsStream(Path path,
java.io.InputStream stream)
Sets the contents of this file to the bytes in the given input stream.
|
void |
setProjectInformationProvider(com.google.inject.Provider<WorkspaceConfig> projectInformationProvider) |
java.net.URI |
toURI(Path path)
Returns the URI representing the given path.
|
getContents, getEncodingProvider, getPostProcessor, setContents, setEncodingProvider, setPostProcessor
public java.lang.Iterable<? extends Path> getChildren(Path path)
protected java.io.File getJavaIOFile(Path path)
public boolean exists(Path path)
path
- the pathpublic boolean isFolder(Path path)
public boolean isFile(Path path)
public long getLastModification(Path path)
long
value representing the time the file was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L
if the
file does not exist.public java.lang.String getCharset(Path path)
FileSystemSupport
path
- the pathpublic java.io.InputStream getContentsAsStream(Path path)
FileSystemSupport
path
- the pathpublic void mkdir(Path path)
MutableFileSystemSupport
path
- the path to the filepublic void delete(Path path)
MutableFileSystemSupport
public void setContentsAsStream(Path path, java.io.InputStream stream)
MutableFileSystemSupport
path
- the path to the filestream
- an input stream containing the new contents of the filepublic java.net.URI toURI(Path path)
FileSystemSupport
Warning: Don't use this method to get write access.
path
- the pathpublic Path getPath(org.eclipse.emf.ecore.resource.Resource res)
getPath
in class AbstractFileSystemSupport
@Pure public com.google.inject.Provider<WorkspaceConfig> getProjectInformationProvider()
public void setProjectInformationProvider(com.google.inject.Provider<WorkspaceConfig> projectInformationProvider)