public interface IFileHandle
| 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.
|
Object |
getFile()
Get the base file object.
|
String |
read(int characters)
Read characters from a file.
|
String |
readLine()
Read a line of data from a file.
|
boolean |
write(String data)
Write data to a file
|
static final int READ
static final int WRITE
static final int APPEND
String read(int characters) throws IOException
characters - amount of characters to readIOException - on access errorsString readLine() throws IOException
IOException - on access errorsboolean write(String data)
data - data to writetrue on successboolean exists()
true when file existsboolean createFile(boolean createHierarchy)
throws Exception
createHierarchy - create parent folders if they do not existtrue on successException - on creation errorsvoid close()
Object getFile()