commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dingxbcn (JIRA)" <>
Subject [jira] [Created] (VFS-677) [VFS] [sftp] The file type does not support append mode.
Date Thu, 25 Oct 2018 03:13:00 GMT
dingxbcn created VFS-677:

             Summary: [VFS] [sftp] The file type does not support append mode.
                 Key: VFS-677
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.2
         Environment: {code:java}
            Reporter: dingxbcn
         Attachments: image-2018-10-25-11-10-10-799.png

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@" );
if (!file.exists()) {

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(
at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(
I checked the source code. seems its easy to support APPEND option in sftp. {color:#FF0000}Why
commons-vfs doesn't do that?{color}



This message was sent by Atlassian JIRA

View raw message