Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions exist-ant/src/test/resources-filtered/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
1 change: 1 addition & 0 deletions exist-core/src/test/resources-filtered/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@
<module uri="http://exist-db.org/xquery/validation" class="org.exist.xquery.functions.validation.ValidationModule" />
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule" />

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@
<module uri="http://exist-db.org/xquery/validation" class="org.exist.xquery.functions.validation.ValidationModule" />
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule" />

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@
<module uri="http://exist-db.org/xquery/validation" class="org.exist.xquery.functions.validation.ValidationModule" />
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule" />

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@
<module uri="http://exist-db.org/xquery/validation" class="org.exist.xquery.functions.validation.ValidationModule" />
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule" />

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
6 changes: 6 additions & 0 deletions exist-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>exist-expath-file</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>exist-file</artifactId>
Expand Down
1 change: 1 addition & 0 deletions exist-distribution/src/main/config/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@
<module uri="http://exist-db.org/xquery/cqlparser" class="org.exist.xquery.modules.cqlparser.CQLParserModule"/>
<!-- module uri="http://exist-db.org/xquery/exi" class="org.exist.xquery.modules.exi.ExiModule"/ -->
<module uri="http://exist-db.org/xquery/repo" class="org.exist.xquery.modules.expathrepo.ExpathPackageModule"/>
<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
<module uri="http://exist-db.org/xquery/file" class="org.exist.xquery.modules.file.FileModule"/>
<module uri="http://exist-db.org/xquery/image" class="org.exist.xquery.modules.image.ImageModule"/>
<module uri="http://exist-db.org/xquery/jndi" class="org.exist.xquery.modules.jndi.JNDIModule"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
1 change: 1 addition & 0 deletions extensions/debuggee/src/test/resources-filtered/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@

<builtin-modules>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
1 change: 1 addition & 0 deletions extensions/expath/src/test/resources-filtered/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@
<module uri="http://exist-db.org/xquery/util" class="org.exist.xquery.functions.util.UtilModule">
<parameter name="evalDisabled" value="true"/>
</module>
<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<module uri="http://exist-db.org/xquery/lucene" class="org.exist.xquery.modules.lucene.LuceneModule"/>
<module uri="http://exist-db.org/xquery/vector" class="org.exist.xquery.modules.vector.VectorModule"/>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>
<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@
</module>
<module uri="http://exist-db.org/xquery/xmldb" class="org.exist.xquery.functions.xmldb.XMLDBModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@
<!-- Module under test -->
<module uri="http://exist-db.org/xquery/counter" class="org.exist.xquery.modules.file.CounterModule"/>

<module uri="http://expath.org/ns/file" class="org.exist.xquery.modules.file.expath.ExpathFileModule"/>
</builtin-modules>
</xquery>

Expand Down
57 changes: 57 additions & 0 deletions extensions/modules/expath-file/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

eXist-db Open Source Native XML Database
Copyright (C) 2001 The eXist-db Authors

info@exist-db.org
http://www.exist-db.org

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.exist-db</groupId>
<artifactId>exist-parent</artifactId>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../../../exist-parent</relativePath>
</parent>

<artifactId>exist-expath-file</artifactId>
<packaging>jar</packaging>

<name>eXist-db EXPath File Module</name>
<description>EXPath File Module 4.0 for eXist-db (http://expath.org/ns/file)</description>

<scm>
<connection>scm:git:https://github.com/exist-db/exist.git</connection>
<developerConnection>scm:git:https://github.com/exist-db/exist.git</developerConnection>
<url>scm:git:https://github.com/exist-db/exist.git</url>
<tag>HEAD</tag>
</scm>

<dependencies>
<dependency>
<groupId>org.exist-db</groupId>
<artifactId>exist-core</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
* info@exist-db.org
* http://www.exist-db.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.exist.xquery.modules.file.expath;

import org.exist.dom.QName;
import org.exist.xquery.ErrorCodes.ErrorCode;

/**
* Error codes defined by the EXPath File Module 4.0.
*
* @see <a href="https://qt4cg.org/specifications/expath-file-40/Overview.html">EXPath File Module 4.0</a>
*/
public class ExpathFileErrorCode {

public static final ErrorCode NOT_FOUND = new ErrorCode(
new QName("not-found", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path does not exist.");

public static final ErrorCode INVALID_PATH = new ErrorCode(
new QName("invalid-path", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path is invalid.");

public static final ErrorCode EXISTS = new ErrorCode(
new QName("exists", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path already exists.");

public static final ErrorCode NO_DIR = new ErrorCode(
new QName("no-dir", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path does not point to a directory.");

public static final ErrorCode IS_DIR = new ErrorCode(
new QName("is-dir", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path points to a directory.");

public static final ErrorCode IS_RELATIVE = new ErrorCode(
new QName("is-relative", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified path is relative.");

public static final ErrorCode UNKNOWN_ENCODING = new ErrorCode(
new QName("unknown-encoding", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified encoding is not supported.");

public static final ErrorCode OUT_OF_RANGE = new ErrorCode(
new QName("out-of-range", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"The specified offset or length is out of range.");

public static final ErrorCode IO_ERROR = new ErrorCode(
new QName("io-error", ExpathFileModule.NAMESPACE_URI, ExpathFileModule.PREFIX),
"A generic file system error occurred.");

private ExpathFileErrorCode() {
// no instances
}
}
Loading
Loading