public interface IFileHandle
IFile or File instance.| Modifier and Type | Field and Description |
|---|---|
static int |
APPEND
Open file in append mode.
|
static int |
READ
Open file in read mode.
|
static int |
WRITE
Open file in write mode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close a file instance.
|
boolean |
createFile(boolean createHierarchy)
Create a file.
|
boolean |
exists()
Check if a physical file exists.
|
java.lang.Object |
getFile()
Get the base file object.
|
java.lang.String |
read(int characters)
Read characters from a file.
|
java.lang.String |
readLine()
Read a line of data from a file.
|
boolean |
write(byte[] data)
Write data to a file.
|
boolean |
write(java.lang.String data)
Write data to a file.
|
static final int READ
static final int WRITE
static final int APPEND
java.lang.String read(int characters)
throws java.io.IOException
characters - amount of characters to readjava.io.IOException - on access errorsjava.lang.String readLine()
throws java.io.IOException
java.io.IOException - on access errorsboolean write(java.lang.String data)
data - data to writetrue on successboolean write(byte[] data)
data - data to writetrue on successboolean exists()
true when file existsboolean createFile(boolean createHierarchy)
throws java.lang.Exception
createHierarchy - create parent folders if they do not existtrue on successjava.lang.Exception - on creation errorsvoid close()
java.lang.Object getFile()
IFile or a File instance.