BASEXSUFFIX, BLOCKSIZE, CSVSUFFIX, DATE, DATEPATTERN, ENTRIES, FILEPREF, GZSUFFIX, HTMLSUFFIXES, JSONSUFFIX, MAXATTS, NODEPOWER, NODESIZE, OFFCOMP, OFFNUM, TXTSUFFIXES, XARSUFFIX, XMLSUFFIX, XMLSUFFIXES, XQMSUFFIX, XQSUFFIX, XQSUFFIXES, ZIPSUFFIX, ZIPSUFFIXES| Constructor and Description |
|---|
IOFile(java.io.File f)
Constructor.
|
IOFile(IOFile dir,
java.lang.String n)
Constructor.
|
IOFile(java.lang.String f)
Constructor.
|
IOFile(java.lang.String dir,
java.lang.String n)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IOFile[] |
children()
Returns the children of the path.
|
IOFile[] |
children(java.lang.String pattern)
Returns the children of the path that match the specified regular
expression.
|
boolean |
delete()
Deletes the IO reference.
|
StringList |
descendants()
Returns the relative paths of all descendant files.
|
java.lang.String |
dir()
Returns the directory.
|
boolean |
exists()
Tests if the file exists.
|
java.io.File |
file()
Returns the file reference.
|
org.xml.sax.InputSource |
inputSource()
Returns an input source.
|
java.io.InputStream |
inputStream()
Returns an input stream.
|
boolean |
isArchive()
Checks if this file is an archive.
|
boolean |
isDir()
Tests if this is a directory instance.
|
boolean |
isXML()
Checks if this file contains XML.
|
long |
length()
Returns the file length.
|
boolean |
md()
Recursively creates the directory.
|
IO |
merge(java.lang.String f)
Merges two filenames.
|
boolean |
more(boolean archives)
Checks if more input streams are found.
|
byte[] |
read()
Returns the contents.
|
static java.lang.String |
regex(java.lang.String glob)
Converts a file filter (glob) to a regular expression.
|
static java.lang.String |
regex(java.lang.String glob,
boolean sub)
Converts a file filter (glob) to a regular expression.
|
boolean |
rename(IOFile trg)
Renames the file to the specified name.
|
long |
timeStamp()
Returns the modification date of this file.
|
boolean |
touch()
Creates a new instance of this file.
|
java.lang.String |
url()
Creates a URL from the specified path.
|
void |
write(byte[] c)
Writes the specified byte array.
|
void |
write(java.io.InputStream in)
Writes the specified input.
|
public IOFile(java.lang.String f)
f - file pathpublic IOFile(java.io.File f)
f - file referencepublic IOFile(java.lang.String dir,
java.lang.String n)
dir - directoryn - file namepublic IOFile(IOFile dir, java.lang.String n)
dir - directoryn - file namepublic java.io.File file()
public boolean touch()
public byte[] read()
throws java.io.IOException
IOpublic boolean exists()
IOtrue by default.public boolean isDir()
IOpublic long timeStamp()
IOpublic long length()
IOpublic boolean more(boolean archives)
throws java.io.IOException
IOpublic boolean isArchive()
IOpublic boolean isXML()
IOpublic org.xml.sax.InputSource inputSource()
IOinputSource in class IOpublic java.io.InputStream inputStream()
throws java.io.IOException
IOinputStream in class IOjava.io.IOException - I/O exceptionpublic boolean md()
public java.lang.String dir()
IOpublic IOFile[] children()
public IOFile[] children(java.lang.String pattern)
pattern - regular expression patternpublic StringList descendants()
public void write(byte[] c)
throws java.io.IOException
c - contentsjava.io.IOException - I/O exceptionpublic void write(java.io.InputStream in)
throws java.io.IOException
in - input streamjava.io.IOException - I/O exceptionpublic boolean delete()
public boolean rename(IOFile trg)
trg - target referencepublic java.lang.String url()
IOpublic static java.lang.String regex(java.lang.String glob)
glob - filterpublic static java.lang.String regex(java.lang.String glob,
boolean sub)
glob - filtersub - accept substring in the result