commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijuan Mao" <zhij...@gmail.com>
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 = "http://test.com/testfile";
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 "http://test.com/testfile" because it already exists and
is a
 file.
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:848)
        at org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:859)
        at com.dolby.nlps.agents.fileio.FileTransferAgent.process(FileTransferAgent.java:110)
        ... 13 more

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

Thanks a lot!

Joanne

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message