Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.2
-
None
Description
I am trying to append content to a sftp file. but vfs seems not supports that.
My test code:
FileObject file = fsManager.resolveFile("sftp://root:xxx@192.168.1.1:22/sftpappend.txt" ); if (!file.exists()) { file.createFile(); } FileContent content = file.getContent(); OutputStream outputStream = content.getOutputStream(true);
Error info :
org.apache.commons.vfs2.FileSystemException: The file type does not support append mode. at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1180) at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:413)
I checked the source code. seems its easy to support APPEND option in sftp. Why commons-vfs doesn't do that?
org.apache.commons.vfs2.provider.sftp.SftpFileObject#doGetOutputStream
Attachments
Attachments
Issue Links
- links to