public class FilePathZip2 extends FilePath
| Constructor and Description |
|---|
FilePathZip2() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
Check if the file is writable.
|
void |
createDirectory()
Create a directory (all required parent directories already exist).
|
boolean |
createFile()
Create a new file.
|
FilePath |
createTempFile(java.lang.String suffix,
boolean deleteOnExit,
boolean inTempDir)
Create a new temporary file.
|
void |
delete()
Delete a file or directory if it exists.
|
boolean |
exists()
Checks if a file exists.
|
FilePath |
getParent()
Get the parent directory of a file or directory.
|
FilePathZip2 |
getPath(java.lang.String path)
Convert a file to a path.
|
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider.
|
boolean |
isAbsolute()
Check if the file name includes a path.
|
boolean |
isDirectory()
Check if it is a file or a directory.
|
long |
lastModified()
Get the last modified date of a file
|
void |
moveTo(FilePath newName,
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.
|
static FilePathZip2 |
register()
Register the file system.
|
boolean |
setReadOnly()
Disable the ability to write.
|
long |
size()
Get the size of a file in bytes
|
FilePath |
toRealPath()
Normalize a file name.
|
FilePath |
unwrap()
Get the unwrapped file name (without wrapper prefixes if wrapping /
delegating file systems are used).
|
get, getName, getNextTempFileNamePart, register, toString, unregisterpublic static FilePathZip2 register()
public FilePathZip2 getPath(java.lang.String path)
FilePathjava.nio.file.spi.FileSystemProvider.getPath, but may
return an object even if the scheme doesn't match in case of the the
default file provider.public void createDirectory()
FilePathcreateDirectory in class FilePathpublic boolean createFile()
FilePathcreateFile in class FilePathpublic FilePath createTempFile(java.lang.String suffix, boolean deleteOnExit, boolean inTempDir) throws java.io.IOException
FilePathcreateTempFile in class FilePathsuffix - the suffixdeleteOnExit - if the file should be deleted when the virtual
machine existsinTempDir - if the file should be stored in the temporary directoryjava.io.IOExceptionpublic void delete()
FilePathpublic boolean exists()
FilePathpublic long lastModified()
FilePathlastModified in class FilePathpublic FilePath getParent()
FilePathpublic boolean isAbsolute()
FilePathisAbsolute in class FilePathpublic FilePath unwrap()
FilePathpublic boolean isDirectory()
FilePathisDirectory in class FilePathpublic boolean canWrite()
FilePathpublic boolean setReadOnly()
FilePathsetReadOnly in class FilePathpublic long size()
FilePathpublic java.util.ArrayList<FilePath> newDirectoryStream()
FilePathnewDirectoryStream in class FilePathpublic FilePath toRealPath()
FilePathtoRealPath in class FilePathpublic java.io.InputStream newInputStream()
throws java.io.IOException
FilePathnewInputStream in class FilePathjava.io.IOExceptionpublic java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePathpublic java.io.OutputStream newOutputStream(boolean append)
FilePathnewOutputStream in class FilePathappend - if true, the file will grow, if false, the file will be
truncated firstpublic void moveTo(FilePath newName, boolean atomicReplace)
FilePath