-----Message d'origine-----
De : Mario Ivankovits [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 14 février 2005 22:22
À : Jakarta Commons Developers List
Objet : Re: [VFS] Asking for a solution with Zip files


Stéphane Rault wrote:
>I've understood that i can't resolveFile like 
>zip:file://c:/temp/toto.zip!/myFile.txt if toto.zip doesn't exist.
>  
Bad news: The ZipFileProvider does not support creating/updating 
zip-files. :-(

--> Really a bad news ! But I'm not able to develop it on my own so, I will
manage to do without

>The same question is available if the URL is 
>ftp://myserver.fr/myNotCreatedDirectory/theFileIWantToPut.ext.
>  
FileObject fo = 
VFS.getManager().resolveFile("ftp://myserver.fr/myNotCreatedDirectory/theFil
eIWantToPut.ext");
fo.getParent().createFolder();
fo.createFile();

--> I leave this problem because I've another one to deal with : 
When I try to create a file like this
ftp://name:[EMAIL PROTECTED]/aNewFile I catch an Exception like this one
org.apache.commons.vfs.FileSystemException: Unknown message with code
"vfs.provider/create-file.error".
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFile(AbstractFileOb
ject.java:773)
Caused by : org.apache.commons.vfs.FileSystemException: Could not create
folder "ftp://name:[EMAIL PROTECTED]/aNewFile" because it already exists
and is a file.
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFile
Object.java:793)
        at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractF
ileObject.java:1120)
        at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractF
ileObject.java:1088)
        at
org.apache.commons.vfs.provider.AbstractFileObject.createFile(AbstractFileOb
ject.java:764)
        ... 3 more


Following the code, I see that i decide to create the folder even if it
exist..

Is it a bug ? FTP Provider is writable ?

Thanks for your help..
--
Stéphane.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to