public class FilePathSplit extends FilePathWrapper
| Constructor and Description |
|---|
FilePathSplit() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete a file or directory if it exists.
|
protected java.lang.String |
getPrefix() |
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider.
|
long |
lastModified()
Get the last modified date of a file
|
void |
moveTo(FilePath path,
boolean atomicReplace)
Rename a file if this is allowed.
|
java.util.ArrayList<FilePath> |
newDirectoryStream()
List the files and directories in the given directory.
|
java.io.InputStream |
newInputStream()
Create an input stream to read from the file.
|
java.io.OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
java.nio.channels.FileChannel |
open(java.lang.String mode)
Open a random access file object.
|
boolean |
setReadOnly()
Disable the ability to write.
|
long |
size()
Get the size of a file in bytes
|
FilePath |
unwrap(java.lang.String fileName)
Get the base path for the given wrapped path.
|
canWrite, createDirectory, createFile, createTempFile, exists, getBase, getParent, getPath, isAbsolute, isDirectory, toRealPath, unwrap, wrapget, getName, getNextTempFileNamePart, register, toString, unregisterprotected java.lang.String getPrefix()
getPrefix in class FilePathWrapperpublic FilePath unwrap(java.lang.String fileName)
FilePathWrapperunwrap in class FilePathWrapperfileName - the path including the scheme prefixpublic boolean setReadOnly()
FilePathsetReadOnly in class FilePathWrapperpublic void delete()
FilePathdelete in class FilePathWrapperpublic long lastModified()
FilePathlastModified in class FilePathWrapperpublic long size()
FilePathsize in class FilePathWrapperpublic java.util.ArrayList<FilePath> newDirectoryStream()
FilePathnewDirectoryStream in class FilePathWrapperpublic java.io.InputStream newInputStream()
throws java.io.IOException
FilePathnewInputStream in class FilePathWrapperjava.io.IOExceptionpublic java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePathopen in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdjava.io.IOExceptionpublic java.io.OutputStream newOutputStream(boolean append)
throws java.io.IOException
FilePathnewOutputStream in class FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstjava.io.IOExceptionpublic void moveTo(FilePath path, boolean atomicReplace)
FilePathmoveTo in class FilePathWrapperpath - the new fully qualified file nameatomicReplace - whether the move should be atomic, and the target
file should be replaced if it exists and replacing is possible