commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eyvind Almqvist <>
Subject How to create a new file?
Date Wed, 31 Jan 2007 13:05:08 GMT
I need to upload files to a server through SFTP. First I have to create a 
file with a new file name. Then I have to write the outputstream to that 
file to fill it with content.

The only method I have found for creating a new file is 
createFile(FileName name) 

in the SftpFileSystem class. But since that class has a protected 
constructor, there is no way to get an instance of that class. Or is it?

Is there any way to get an instance of the SftpFileSystem class, so I can 
use its createFile method?

Or is there some better way to create files that the way I have planned 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message