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()
File
public File newFile(String relativePath)
File
public long timestamp()
File
public String getFullPath()
File
getFullPath
in class File
public void renameTo(File dest) throws IOException
renameTo
in class File
dest
- IOException
public DataInputStream open4read(long offset) throws IOException
open4read
in class File
IOException
- Description of the Exceptionpublic DataInputStream open4readseek(long offset) throws IOException
open4readseek
in class File
IOException
- Description of the Exceptionpublic boolean mkdir() throws IOException
File
mkdir
in class File
IOException
public final void mkparentdirs()
mkparentdirs
in class File
public DataOutputStream open4append() throws IOException
open4append
in class File
IOException
- Description of the Exceptionpublic DataOutputStream open4rewrite() throws IOException
open4rewrite
in class File
IOException
- Description of the Exceptionpublic DataInputOutputStream open4rw(long offset) throws IOException
open4rw
in class File
offset
- the initial offset positionIOException
public void delete()
public boolean exists()
File
public boolean createNewFile() throws IOException
File
createNewFile
in class File
IOException
public DataInputStream open4gzipread() throws IOException
File
open4gzipread
in class File
IOException
- Description of the Exceptionpublic DataOutputStream open4gziprewrite() throws IOException
File
open4gziprewrite
in class File
IOException
- Description of the Exceptionpublic String getCanonicalPath() throws IOException
File
getCanonicalPath
in class File
IOException
public boolean isDirectory()
isDirectory
in class File
public File getJavaFile()
getJavaFile
in class File
Copyright © 2016 Egothor. All Rights Reserved.