commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijuan Mao" <>
Subject [commons-vfs] issues in http?
Date Wed, 18 Jul 2007 20:50:56 GMT
Hi All:

I am having a new question regarding http in vfs. Basically I would
like to use vfs to upload a local file to a web server.

I seem to be able to resolve a file object when passing in a http url.  eg.
String path = "";
FileObject myFile = VFS.getManager().resolveFile(path);

But I cannot seem to do a copyFile for this File object eg:
myFile.copyFrom(localFileObject, Selectors.SELECT_ALL);

It always throws me the following exception:

Caused by: org.apache.commons.vfs.FileSystemException: Could not
create folder "" because it already exists and
is a
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(
        at com.dolby.nlps.agents.fileio.FileTransferAgent.process(
        ... 13 more

Can anyone please let me know what is wrong with it?

Thanks a lot!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message