Modifier and Type | Field and Description |
---|---|
static String |
BASEXSUFFIX
Database file suffix.
|
static int |
BLOCKSIZE
Disk block/page size (4096).
|
static String |
BXSSUFFIX
Command script suffix.
|
static String |
CSVSUFFIX
CSV file suffix.
|
static int |
ENTRIES
Entries per block (256).
|
static String |
FILEPREF
File prefix.
|
static String |
GZSUFFIX
GZIP file suffix.
|
static String[] |
HTMLSUFFIXES
HTML suffixes.
|
static String |
IGNORESUFFIX
Ignore suffix.
|
static String |
JARSUFFIX
JAR file suffix.
|
static String |
JSONSUFFIX
JSON file suffix.
|
static String[] |
JSSUFFIXES
JS file suffixes.
|
protected long |
len
File size (in bytes).
|
static String |
LOGSUFFIX
XQuery log suffix.
|
static int |
MAXATTS
Maximum number of attributes (see bit layout in
Data class). |
static int |
NODEPOWER
Table node size power (4).
|
static int |
NODESIZE
Table node size power (16).
|
protected String |
pth
Absolute file path.
|
static String |
RAW
Directory for raw files.
|
static String |
TARGZSUFFIX
TGZIP file suffix.
|
static String |
TARSUFFIX
TAR file suffix.
|
static String |
TGZSUFFIX
TGZIP file suffix.
|
static String |
TMPSUFFIX
Temporary file suffix.
|
static String[] |
TXTSUFFIXES
Text suffixes.
|
static String |
XARSUFFIX
XAR file suffix.
|
static String |
XMLSUFFIX
XML file suffix.
|
static String |
XQMSUFFIX
XQuery module suffix.
|
static String |
XQSUFFIX
XQuery file suffix.
|
static String[] |
XQSUFFIXES
XQuery suffixes.
|
static String[] |
XSLSUFFIXES
XSL suffixes.
|
static String |
ZIPSUFFIX
ZIP file suffix.
|
static String[] |
ZIPSUFFIXES
Archive suffixes.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkSuffix(String path,
String... suffixes)
Tests if the file suffix of a path matches the specified suffixes.
|
String |
dbName()
Generates a database name from the name of this resource.
|
String |
dir()
Returns the directory path (all characters up to the last slash).
|
boolean |
eq(IO io)
Compares the filename of the specified IO reference.
|
boolean |
exists()
Tests if the reference exists.
|
static IO |
get(String location)
Returns a class instance for the specified location string.
|
boolean |
hasSuffix(String... suffixes)
Tests if the file suffix matches the specified suffixes.
|
abstract InputSource |
inputSource()
Returns an input source.
|
abstract InputStream |
inputStream()
Returns an input stream.
|
boolean |
isAbsolute()
Tests if this is an absolute path.
|
boolean |
isArchive()
Checks if this file is an archive.
|
boolean |
isDir()
Tests if this is a local directory instance, or if the path ends with a slash.
|
long |
length()
Returns the file length.
|
void |
length(long length)
Sets the input length.
|
IO |
merge(String path)
Merges two paths.
|
String |
name()
Returns the name of the resource.
|
void |
name(String name)
Sets the name of the resource.
|
String |
path()
Returns the full path.
|
abstract byte[] |
read()
Returns the binary contents.
|
abstract StreamSource |
streamSource()
Returns a stream source.
|
String |
string()
Returns the contents as string.
|
long |
timeStamp()
Returns the time stamp (modification date) of this file.
|
String |
toString() |
String |
url()
Creates a URL from the specified path.
|
public static final String TMPSUFFIX
public static final String BASEXSUFFIX
public static final String BXSSUFFIX
public static final String XQSUFFIX
public static final String XQMSUFFIX
public static final String XMLSUFFIX
public static final String ZIPSUFFIX
public static final String CSVSUFFIX
public static final String JSONSUFFIX
public static final String JARSUFFIX
public static final String TARGZSUFFIX
public static final String TGZSUFFIX
public static final String GZSUFFIX
public static final String TARSUFFIX
public static final String XARSUFFIX
public static final String LOGSUFFIX
public static final String IGNORESUFFIX
public static final String RAW
public static final String FILEPREF
public static final String[] XQSUFFIXES
public static final String[] ZIPSUFFIXES
public static final String[] XSLSUFFIXES
public static final String[] HTMLSUFFIXES
public static final String[] TXTSUFFIXES
public static final String[] JSSUFFIXES
public static final int BLOCKSIZE
public static final int NODEPOWER
public static final int NODESIZE
public static final int ENTRIES
public static final int MAXATTS
Data
class).protected String pth
protected long len
public static IO get(String location)
Returns a class instance for the specified location string. The type of the returned instance depends on the string value:
If the content of the string value is known in advance, it is advisable to call the direct constructors of the correspondent sub class.location
- locationpublic abstract byte[] read() throws IOException
IOException
- I/O exceptionpublic final String string() throws IOException
IOException
- I/O exceptionpublic boolean exists()
true
for IO instances other than IOFile
.public boolean isDir()
public boolean isAbsolute()
public final boolean hasSuffix(String... suffixes)
suffixes
- suffixes to compare withpublic long timeStamp()
IOFile
.public final void length(long length)
length
- lengthpublic long length()
public abstract InputSource inputSource()
public abstract StreamSource streamSource()
public abstract InputStream inputStream() throws IOException
IOException
- I/O exceptionpublic final IO merge(String path)
path
- path to be mergedpublic final boolean isArchive()
public final String dbName()
public final String name()
public final void name(String name)
name
- file namepublic final String path()
public final String dir()
public String url()
IOFile
.public boolean eq(IO io)
io
- io referenceCopyright © 2005–2023 BaseX Team. All rights reserved.