commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stéphane Rault <ksbra...@yahoo.fr>
Subject RE : [VFS] Asking for a solution with Zip files
Date Fri, 25 Feb 2005 09:31:11 GMT
-----Message d'origine-----
De : Mario Ivankovits [mailto:mario@ops.co.at] 
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:password@myftpserver/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:password@myftpserver/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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message