Package com.saxonica.functions.extfn
Class EXPathFile
- java.lang.Object
-
- com.saxonica.functions.extfn.EXPathFile
-
public class EXPathFile extends java.lang.Object
Implementation of extension functions in the EXPath File package, see http://expath.org/spec/file
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ERROR_INDEX_OUT_OF_BOUNDS
static java.lang.String
ERROR_IO
static java.lang.String
ERROR_NAMESPACE
static java.lang.String
ERROR_PREFIX
static java.lang.String
NAMESPACE
static java.lang.String
NEWLINE
static java.lang.String
PREFIX
static BigDecimalValue
VERSION
-
Constructor Summary
Constructors Constructor Description EXPathFile()
-
Method Summary
-
-
-
Field Detail
-
VERSION
public static final BigDecimalValue VERSION
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
ERROR_NAMESPACE
public static final java.lang.String ERROR_NAMESPACE
- See Also:
- Constant Field Values
-
ERROR_PREFIX
public static final java.lang.String ERROR_PREFIX
- See Also:
- Constant Field Values
-
ERROR_INDEX_OUT_OF_BOUNDS
public static final java.lang.String ERROR_INDEX_OUT_OF_BOUNDS
- See Also:
- Constant Field Values
-
ERROR_IO
public static final java.lang.String ERROR_IO
- See Also:
- Constant Field Values
-
NEWLINE
public static final java.lang.String NEWLINE
-
-
Method Detail
-
version
public static BigDecimalValue version()
-
exists
public static One<BooleanValue> exists(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
isDir
public static One<BooleanValue> isDir(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
isFile
public static One<BooleanValue> isFile(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
lastModified
public static One<DateTimeValue> lastModified(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
size
public static One<IntegerValue> size(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
append
public static void append(XPathContext context, One<StringValue> file, ZeroOrMore<Item> contents) throws XPathException
- Throws:
XPathException
-
append
public static void append(XPathContext context, One<StringValue> file, ZeroOrMore<Item> contents, One<NodeInfo> params) throws XPathException
- Throws:
XPathException
-
appendText
public static void appendText(One<StringValue> path, One<StringValue> contents) throws XPathException
- Throws:
XPathException
-
appendText
public static void appendText(One<StringValue> path, One<StringValue> contents, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
appendTextLines
public static void appendTextLines(One<StringValue> path, ZeroOrMore<StringValue> contents) throws XPathException
- Throws:
XPathException
-
appendTextLines
public static void appendTextLines(One<StringValue> path, ZeroOrMore<StringValue> contents, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
appendBinary
public static void appendBinary(One<StringValue> path, ZeroOrMore<Base64BinaryValue> contents) throws XPathException
- Throws:
XPathException
-
copy
public static void copy(One<StringValue> source, One<StringValue> target) throws XPathException
- Throws:
XPathException
-
createDir
public static void createDir(One<StringValue> dir) throws XPathException
- Throws:
XPathException
-
createTempDir
public static One<StringValue> createTempDir(XPathContext context, One<StringValue> prefix, One<StringValue> suffix) throws XPathException, java.io.IOException
- Throws:
XPathException
java.io.IOException
-
createTempDir
public static One<StringValue> createTempDir(XPathContext context, One<StringValue> prefix, One<StringValue> suffix, One<StringValue> dir) throws XPathException, java.io.IOException
- Throws:
XPathException
java.io.IOException
-
createTempFile
public static One<StringValue> createTempFile(XPathContext context, One<StringValue> prefix, One<StringValue> suffix) throws XPathException, java.io.IOException
- Throws:
XPathException
java.io.IOException
-
createTempFile
public static One<StringValue> createTempFile(XPathContext context, One<StringValue> prefix, One<StringValue> suffix, One<StringValue> dir) throws XPathException, java.io.IOException
- Throws:
XPathException
java.io.IOException
-
delete
public static void delete(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
delete
public static void delete(One<StringValue> path, boolean recurse) throws XPathException
- Throws:
XPathException
-
list
public static ZeroOrMore<StringValue> list(One<StringValue> dir) throws XPathException
- Throws:
XPathException
-
list
public static ZeroOrMore<StringValue> list(One<StringValue> dir, One<BooleanValue> recursive) throws XPathException
- Throws:
XPathException
-
list
public static ZeroOrMore<StringValue> list(One<StringValue> dir, One<BooleanValue> recursive, One<StringValue> pattern) throws XPathException
- Throws:
XPathException
-
move
public static void move(One<StringValue> source, One<StringValue> target) throws XPathException
- Throws:
XPathException
-
readBinary
public static One<Base64BinaryValue> readBinary(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
readBinary
public static One<Base64BinaryValue> readBinary(One<StringValue> path, One<IntegerValue> offset) throws XPathException
- Throws:
XPathException
-
readBinary
public static One<Base64BinaryValue> readBinary(One<StringValue> path, One<IntegerValue> offset, One<IntegerValue> length) throws XPathException
- Throws:
XPathException
-
readText
public static One<StringValue> readText(XPathContext context, One<StringValue> file) throws XPathException
- Throws:
XPathException
-
readText
public static One<StringValue> readText(XPathContext context, One<StringValue> path, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
readTextLines
public static ZeroOrMore<StringValue> readTextLines(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
readTextLines
public static ZeroOrMore<StringValue> readTextLines(One<StringValue> path, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
readBinary
public static Base64BinaryValue readBinary(java.io.File file, java.lang.String path, long offset, long length) throws XPathException
- Throws:
XPathException
-
write
public static void write(XPathContext context, One<StringValue> file, ZeroOrMore<Item> contents) throws XPathException
- Throws:
XPathException
-
write
public static void write(XPathContext context, One<StringValue> file, ZeroOrMore<Item> contents, One<NodeInfo> params) throws XPathException
- Throws:
XPathException
-
writeBinary
public static void writeBinary(One<StringValue> path, One<Base64BinaryValue> contents) throws XPathException
- Throws:
XPathException
-
writeBinary
public static void writeBinary(One<StringValue> path, One<Base64BinaryValue> contents, One<IntegerValue> offset) throws XPathException
- Throws:
XPathException
-
writeText
public static void writeText(One<StringValue> path, One<StringValue> contents) throws XPathException
- Throws:
XPathException
-
writeText
public static void writeText(One<StringValue> path, One<StringValue> contents, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
writeTextLines
public static void writeTextLines(One<StringValue> path, ZeroOrMore<StringValue> contents) throws XPathException
- Throws:
XPathException
-
writeTextLines
public static void writeTextLines(One<StringValue> path, ZeroOrMore<StringValue> contents, One<StringValue> encoding) throws XPathException
- Throws:
XPathException
-
name
public static One<StringValue> name(java.lang.String path) throws XPathException
- Throws:
XPathException
-
parent
public static ZeroOrOne<StringValue> parent(java.lang.String path) throws XPathException
- Throws:
XPathException
-
_parent
public static java.lang.String _parent(java.lang.String path) throws XPathException
- Throws:
XPathException
-
children
public static ZeroOrMore<StringValue> children(One<StringValue> dir) throws XPathException
- Throws:
XPathException
-
pathToNative
public static One<StringValue> pathToNative(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
pathToUri
public static One<AnyURIValue> pathToUri(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
resolvePath
public static One<StringValue> resolvePath(One<StringValue> path) throws XPathException
- Throws:
XPathException
-
dirSeparator
public static One<StringValue> dirSeparator()
-
lineSeparator
public static One<StringValue> lineSeparator()
-
pathSeparator
public static One<StringValue> pathSeparator()
-
tempDir
public static One<StringValue> tempDir()
-
currentDir
public static One<StringValue> currentDir() throws XPathException
- Throws:
XPathException
-
error
public static void error(java.lang.String message, java.lang.String code) throws XPathException
Throw an error- Parameters:
message
- the error messagecode
- the error code to be used- Throws:
XPathException
- always
-
error
public static void error(java.lang.String message, java.lang.Exception cause, java.lang.String code) throws XPathException
Throw an error- Parameters:
message
- the error messagecause
- the underlying exception, usually an IOExceptioncode
- the error code to be used- Throws:
XPathException
- always
-
-