You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/01 20:35:00 UTC

[jira] [Work logged] (VFS-677) [SFTP] Add support for append mode.

     [ https://issues.apache.org/jira/browse/VFS-677?focusedWorklogId=221463&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-221463 ]

ASF GitHub Bot logged work on VFS-677:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Apr/19 20:34
            Start Date: 01/Apr/19 20:34
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on pull request #42: VFS-677 SFTP support append mode.
URL: https://github.com/apache/commons-vfs/pull/42
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 221463)
            Time Spent: 10m
    Remaining Estimate: 0h

> [SFTP] Add support for append mode.
> -----------------------------------
>
>                 Key: VFS-677
>                 URL: https://issues.apache.org/jira/browse/VFS-677
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: {code:java}
> <dependency>
>     <groupId>org.apache.commons</groupId>
>     <artifactId>commons-vfs2</artifactId>
>     <version>2.2</version>
> </dependency>
> {code}
>            Reporter: dingxbcn
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: image-2018-10-25-11-10-10-799.png, image-2018-10-25-13-48-58-673.png, image-2018-10-25-13-49-13-334.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I am trying to append content to a sftp file. but vfs seems not supports that.
>  
> My test code: 
> {code:java}
> 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);
> {code}
>  
> Error info :
> {code:java}
> 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)
> {code}
> I checked the source code. seems its easy to support APPEND option in sftp. {color:#FF0000}Why commons-vfs doesn't do that?{color}
> org.apache.commons.vfs2.provider.sftp.SftpFileObject#doGetOutputStream
> !image-2018-10-25-11-10-10-799.png!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)