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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to