public class ParallelFileSystemSupport extends java.lang.Object implements MutableFileSystemSupport
Constructor and Description |
---|
ParallelFileSystemSupport(org.eclipse.emf.common.util.URI uri,
MutableFileSystemSupport delegate,
FileSystemAccessQueue queue) |
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.lang.CharSequence |
getContents(Path path)
Returns the contents of this file as a char sequence.
|
java.io.InputStream |
getContentsAsStream(Path path)
Returns an open input stream on the contents of this file.
|
long |
getLastModification(Path path) |
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 |
setContents(Path path,
java.lang.CharSequence contents)
Writes the given contents to the given path.
|
void |
setContentsAsStream(Path path,
java.io.InputStream source)
Sets the contents of this file to the bytes in the given input stream.
|
java.net.URI |
toURI(Path path)
Returns the URI representing the given path.
|
public ParallelFileSystemSupport(org.eclipse.emf.common.util.URI uri, MutableFileSystemSupport delegate, FileSystemAccessQueue queue)
public void delete(Path path)
MutableFileSystemSupport
delete
in interface MutableFileSystemSupport
public void mkdir(Path path)
MutableFileSystemSupport
mkdir
in interface MutableFileSystemSupport
path
- the path to the filepublic void setContents(Path path, java.lang.CharSequence contents)
MutableFileSystemSupport
setContents
in interface MutableFileSystemSupport
path
- the path to write the contents tocontents
- the contents of the filepublic void setContentsAsStream(Path path, java.io.InputStream source)
MutableFileSystemSupport
setContentsAsStream
in interface MutableFileSystemSupport
path
- the path to the filesource
- an input stream containing the new contents of the filepublic boolean exists(Path path)
exists
in interface FileSystemSupport
path
- the pathpublic java.lang.String getCharset(Path path)
FileSystemSupport
getCharset
in interface FileSystemSupport
path
- the pathpublic java.lang.Iterable<? extends Path> getChildren(Path path)
getChildren
in interface FileSystemSupport
public java.lang.CharSequence getContents(Path path)
FileSystemSupport
getContents
in interface FileSystemSupport
path
- the pathpublic java.io.InputStream getContentsAsStream(Path path)
FileSystemSupport
getContentsAsStream
in interface FileSystemSupport
path
- the pathpublic long getLastModification(Path path)
getLastModification
in interface FileSystemSupport
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 boolean isFile(Path path)
isFile
in interface FileSystemSupport
public boolean isFolder(Path path)
isFolder
in interface FileSystemSupport
public java.net.URI toURI(Path path)
FileSystemSupport
Warning: Don't use this method to get write access.
toURI
in interface FileSystemSupport
path
- the path