public class FileLocal extends File
| Constructor and Description |
|---|
FileLocal(String filename)
Constructor for the FileLocal object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
createNewFile()
Atomically creates a new, empty file named by this abstract pathname
if and only if a file with this name does not yet exist.
|
void |
delete()
Deletes the file or the whole directory.
|
boolean |
exists()
Test whether this file exists on the filesystem.
|
String |
getCanonicalPath()
Return the unique filename of this file.
|
String |
getFullPath()
Return the path of this file.
|
File |
getJavaFile() |
String |
getName() |
boolean |
isDirectory() |
long |
length()
Return the length of the file denoted by this abstract pathname.
|
File[] |
listFiles() |
boolean |
mkdir()
Creates the directory.
|
void |
mkparentdirs() |
File |
newFile(String relativePath)
Constructs a sub-file.
|
DataOutputStream |
open4append()
Description of the Method
|
DataInputStream |
open4gzipread()
Description of the Method
|
DataOutputStream |
open4gziprewrite()
Open for write discarding the content of the file.
|
DataInputStream |
open4read(long offset)
Description of the Method
|
DataInputStream |
open4readseek(long offset)
Description of the Method
|
DataOutputStream |
open4rewrite()
Description of the Method
|
DataInputOutputStream |
open4rw(long offset)
This method returns R/W stream with initial seek at a given offset position.
|
void |
renameTo(File dest) |
long |
timestamp()
Return the timestamp of this file, or -1 when the file does not exist.
|
public FileLocal(String filename)
filename - Description of the Parameterpublic long length()
Filepublic File newFile(String relativePath)
Filepublic long timestamp()
Filepublic String getFullPath()
FilegetFullPath in class Filepublic void renameTo(File dest) throws IOException
renameTo in class Filedest - IOExceptionpublic DataInputStream open4read(long offset) throws IOException
open4read in class FileIOException - Description of the Exceptionpublic DataInputStream open4readseek(long offset) throws IOException
open4readseek in class FileIOException - Description of the Exceptionpublic boolean mkdir()
throws IOException
Filemkdir in class FileIOExceptionpublic final void mkparentdirs()
mkparentdirs in class Filepublic DataOutputStream open4append() throws IOException
open4append in class FileIOException - Description of the Exceptionpublic DataOutputStream open4rewrite() throws IOException
open4rewrite in class FileIOException - Description of the Exceptionpublic DataInputOutputStream open4rw(long offset) throws IOException
open4rw in class Fileoffset - the initial offset positionIOExceptionpublic void delete()
public boolean exists()
Filepublic boolean createNewFile()
throws IOException
FilecreateNewFile in class FileIOExceptionpublic DataInputStream open4gzipread() throws IOException
Fileopen4gzipread in class FileIOException - Description of the Exceptionpublic DataOutputStream open4gziprewrite() throws IOException
Fileopen4gziprewrite in class FileIOException - Description of the Exceptionpublic String getCanonicalPath() throws IOException
FilegetCanonicalPath in class FileIOExceptionpublic boolean isDirectory()
isDirectory in class Filepublic File getJavaFile()
getJavaFile in class FileCopyright © 2016 Egothor. All Rights Reserved.