Christian,

basexclient -d gives only

 

[file:io-error] ... : Die Operation ist nicht erlaubt        at org.basex.api.client.ClientSession.receive(ClientSession.java:192)

        at org.basex.api.client.ClientSession.execute(ClientSession.java:161)

        at org.basex.api.client.ClientSession.execute(ClientSession.java:166)

        at org.basex.api.client.Session.execute(Session.java:36)

        at org.basex.core.CLI.execute(CLI.java:92)

        at org.basex.BaseX.<init>(BaseX.java:100)

        at org.basex.BaseXClient.<init>(BaseXClient.java:35)

        at org.basex.BaseXClient.main(BaseXClient.java:22)

Stopped at ., 1/10:

 

My alternative works:

 

      file:copy($sourcefilepath,$archivedir||file:dir-separator()||$file),

      if (file:exists($archivedir||file:dir-separator()||$file))

      then (file:delete($sourcefilepath))

 

but I think the if/then can be left out, because the query will always fail sequentially before the delete if something goes wrong with the copy (?)

 

Thanks, Daniel

 

Von: Christian GrĂ¼n <christian.gruen@gmail.com>
Gesendet: Dienstag, 11. Februar 2020 16:47
An: Zimmel, Daniel <D.Zimmel@ESVmedien.de>
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Betreff: Re: [basex-talk] file:move() fails when moving to another file system

 

Hi Daniel,

 

BaseX uses standard Java NIO to move files [1]; see [2] for a more comprehensive documentation.

 

You could enable debugging, and we could have a look at the full command line output; maybe that gives us some hints what goes wrong here.

 

Did you try the alternative to copy your files and delete the source afterwards?

 

Best,

Christian

 

[1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/query/func/file/FileCopy.java#L79

[2] https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...)

 

 

 

Zimmel, Daniel <D.Zimmel@esvmedien.de> schrieb am Di., 11. Feb. 2020, 16:39:

Hi,

I am able to file:copy() or file:write() a file from a Linux system to a Windows mount (via cifs).
I am not able to file:move() to the same target.

The error says "file:io-error: Die Operation ist nicht erlaubt"

BaseX version is 9.2.1

Is this a bug or a known restriction with moving things around in Java?

Thanks, Daniel