BaseX File Module : access network folder on windows server
Monday, 22 January 2018 · 3 messages
DZ
Dieter Zanzinger22 Jan 2018 13:49 #
I am working with den BaseX-File-Module for a while and can access a local folder, for example:
file:list('C:/').
Now I want the same in a Windows network.
If I create a folder on the Desktop of the local machine = localhost and give it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible to list it´s contents with: file:list('//WIN7PROPARPC/netzlaufwerktestF/').
Now I try the same with a folder on a server, which I can access by windows explorer. I expected the following to work: file:list('//SERVERNAME_or_IP/Freigabename/')
But I get only errors.
Does anybody know the right way to access a network folder with the file module of BaseX under windows? (I didn´t find anything in the wiki or by google).
Thanks in advance
Dieter ZanzingerCG
Christian Grün22 Jan 2018 19:05 #
Hi Dieter,
I haven’t tried Window networking by myself, but AFAIK access on server is not possible via the File Module. It is based on Java’s default file access, and an additional library (such as [1]) would need to be embedded. JCIFS uses the CIFS/SMB networking protocol to access network drives.
Sorry for that,
Christian
[1] https://jcifs.samba.org/
Quoted text · Dieter Zanzinger · 25 lines
On Mon, Jan 22, 2018 at 1:49 PM, Dieter Zanzinger <dieter.zanzinger at icloud.com> wrote: > > I am working with den BaseX-File-Module for a while and can access a local > folder, > for example: file:list('C:/'). > > Now I want the same in a Windows network. > If I create a folder on the Desktop of the local machine = localhost and > give it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible > to list it´s contents with: > file:list('//WIN7PROPARPC/netzlaufwerktestF/'). > > Now I try the same with a folder on a server, which I can access by windows > explorer. I expected the following to work: > file:list('//SERVERNAME_or_IP/Freigabename/') > > But I get only errors. > Does anybody know the right way to access a network folder with the file > module of BaseX under windows? > (I didn´t find anything in the wiki or by google). > > Thanks in advance > > Dieter Zanzinger
IL
Imsieke, Gerrit, le-tex22 Jan 2018 19:09 #
It works with a file: URI with five forward slashes, like
file:list('file://///SERVERNAME_or_IP/Freigabename/')
The results, if folders, may contain backslashes though.Quoted text · Christian Grün · 41 lines
On 22/01/2018 19:05, Christian Grün wrote: > Hi Dieter, > > I haven’t tried Window networking by myself, but AFAIK access on > server is not possible via the File Module. It is based on Java’s > default file access, and an additional library (such as [1]) would > need to be embedded. JCIFS uses the CIFS/SMB networking protocol to > access network drives. > > Sorry for that, > Christian > > [1] https://jcifs.samba.org/ > > > > On Mon, Jan 22, 2018 at 1:49 PM, Dieter Zanzinger > <dieter.zanzinger at icloud.com> wrote: >> >> I am working with den BaseX-File-Module for a while and can access a local >> folder, >> for example: file:list('C:/'). >> >> Now I want the same in a Windows network. >> If I create a folder on the Desktop of the local machine = localhost and >> give it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible >> to list it´s contents with: >> file:list('//WIN7PROPARPC/netzlaufwerktestF/'). >> >> Now I try the same with a folder on a server, which I can access by windows >> explorer. I expected the following to work: >> file:list('//SERVERNAME_or_IP/Freigabename/') >> >> But I get only errors. >> Does anybody know the right way to access a network folder with the file >> module of BaseX under windows? >> (I didn´t find anything in the wiki or by google). >> >> Thanks in advance >> >> Dieter Zanzinger
--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke at le-tex.de, http://www.le-tex.de
Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930
Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery