public class FilePathSplit extends FilePathWrapper
| 构造器和说明 |
|---|
FilePathSplit() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
delete()
Delete a file or directory if it exists.
|
protected String |
getPrefix() |
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.
|
ArrayList<FilePath> |
newDirectoryStream()
List the files and directories in the given directory.
|
InputStream |
newInputStream()
Create an input stream to read from the file.
|
OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
FileChannel |
open(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(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 String getPrefix()
getPrefix 在类中 FilePathWrapperpublic FilePath unwrap(String fileName)
FilePathWrapperunwrap 在类中 FilePathWrapperfileName - the path including the scheme prefixpublic boolean setReadOnly()
FilePathsetReadOnly 在类中 FilePathWrapperpublic void delete()
FilePathdelete 在类中 FilePathWrapperpublic long lastModified()
FilePathlastModified 在类中 FilePathWrapperpublic long size()
FilePathsize 在类中 FilePathWrapperpublic ArrayList<FilePath> newDirectoryStream()
FilePathnewDirectoryStream 在类中 FilePathWrapperpublic InputStream newInputStream() throws IOException
FilePathnewInputStream 在类中 FilePathWrapperIOExceptionpublic FileChannel open(String mode) throws IOException
FilePathopen 在类中 FilePathWrappermode - the access mode. Supported are r, rw, rws, rwdIOExceptionpublic OutputStream newOutputStream(boolean append) throws IOException
FilePathnewOutputStream 在类中 FilePathWrapperappend - if true, the file will grow, if false, the file will be
truncated firstIOExceptionpublic void moveTo(FilePath path, boolean atomicReplace)
FilePathmoveTo 在类中 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 possibleCopyright © 2017. All rights reserved.