commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Delli Paoli Laura <l.dellipa...@reply.it>
Subject How to resolve a share path to a FileObject
Date Mon, 11 Jun 2012 10:01:36 GMT
Hello everybody!

I'm trying to use VFS2 to copy a file from a remote path to a local folder.

If I run

FileObject srcFile = fsManager.resolveFile(//+hostname+"/"+filename);

localFile.getName().getURI() returns something like file:////path<file:///\\path> and
srcFile.exists() returns false.

On the othe hand

FileObject srcFile =

fsManager.resolveFile("smb://"+user+":"+pw+"@"+hostname+"/"+filename);

fails with the following exception:

Badly formed URI "smb://user:***@hostname/filename"



Can anyone help me??

How can I resolve a share path to a FileObject??

thanks
Laura



Laura Delli Paoli

[Discovery]
Via del Giorgione, 59
00147 - Roma - ITALY
phone: +39 06 844341
l.dellipaoli@reply.it
www.reply.it


________________________________

--
The information transmitted is intended for the person or entity to which it is addressed
and may contain confidential and/or privileged material. Any review, retransmission, dissemination
or other use of, or taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message