You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michaël Leneveut <mi...@capgemini.com> on 2006/11/23 14:24:00 UTC

[VFS]How to upload a file with sftp

Hi,

 

Very sorry to write to this list for this, but I don’t find any doc on VFS.

 

I try to upload a file from a server to another, with SFTP.

 

I resolve my file :

 

FileSystemManager fsManager = fsManager = VFS.getManager();

FileObject file = fsManager.resolveFile( "c:\\Upload\\toto.xml" );

 

But after, how to upload it ?

 

I can’t find the steps :

file.getContent().getInputStream() ?

FileObject fo =
VFS.getManager().resolveFile("sftp://user/pass@serverIP/cygdrive/c/tmp/uploa
d/toto.xml", opts); ?

 

Then how I put the content in my fo file ?

 

Thanks for your help !

 

 

Regards,

 

Michaël.

 



This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

Re: [VFS]How to upload a file with sftp

Posted by Dmitry Negoda <nd...@cdev.ru>.
Use fileObject.getContent().getOutputStream(). The javadoc should be somewhere on their site - I saw it. You can also 'svn checkout' all the VFS tree and build the documentation yourself...

On Thu, 23 Nov 2006 14:24:00 +0100
Michaël Leneveut <mi...@capgemini.com> wrote:

> 
> Hi,
> 
>  
> 
> Very sorry to write to this list for this, but I don’t find any doc on VFS.
> 
>  
> 
> I try to upload a file from a server to another, with SFTP.
> 
>  
> 
> I resolve my file :
> 
>  
> 
> FileSystemManager fsManager = fsManager = VFS.getManager();
> 
> FileObject file = fsManager.resolveFile( "c:\\Upload\\toto.xml" );
> 
>  
> 
> But after, how to upload it ?
> 
>  
> 
> I can’t find the steps :
> 
> file.getContent().getInputStream() ?
> 
> FileObject fo =
> VFS.getManager().resolveFile("sftp://user/pass@serverIP/cygdrive/c/tmp/uploa
> d/toto.xml", opts); ?
> 
>  
> 
> Then how I put the content in my fo file ?
> 
>  
> 
> Thanks for your help !
> 
>  
> 
>  
> 
> Regards,
> 
>  
> 
> Michaël.
> 
>  
> 
> 
> 
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.
> 


-- 
с уважением
Дмитрий Негода
   
ведущий разработчик
ООО "Креативная разработка"
тел.: (8422)79-40-37
   

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