[jira] [Commented] (VFS-677) [VFS] [sftp] The file type does not support append mode.

2018-11-11 Thread dingxbcn (JIRA)


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

dingxbcn commented on VFS-677:
--

https://github.com/apache/commons-vfs/pull/42

Pull request committed.

> [VFS] [sftp] The file type does not support 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}
> 
> org.apache.commons
> commons-vfs2
> 2.2
> 
> {code}
>Reporter: dingxbcn
>Priority: Minor
> 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
>
>
> 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:#FF}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)


[jira] [Commented] (VFS-677) [VFS] [sftp] The file type does not support append mode.

2018-11-11 Thread dingxbcn (JIRA)


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

dingxbcn commented on VFS-677:
--

[~boris-petrov] 
Glad to do that

> [VFS] [sftp] The file type does not support 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}
> 
> org.apache.commons
> commons-vfs2
> 2.2
> 
> {code}
>Reporter: dingxbcn
>Priority: Minor
> 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
>
>
> 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:#FF}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)


[jira] [Commented] (VFS-677) [VFS] [sftp] The file type does not support append mode.

2018-11-01 Thread Boris Petrov (JIRA)


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

Boris Petrov commented on VFS-677:
--

Could you create a pull-request for that on 
[GitHub|https://github.com/apache/commons-vfs]?

> [VFS] [sftp] The file type does not support 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}
> 
> org.apache.commons
> commons-vfs2
> 2.2
> 
> {code}
>Reporter: dingxbcn
>Priority: Minor
> 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
>
>
> 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:#FF}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)


[jira] [Commented] (VFS-677) [VFS] [sftp] The file type does not support append mode.

2018-10-24 Thread dingxbcn (JIRA)


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

dingxbcn commented on VFS-677:
--

I changed 2 class then sftp APPEND mode works well.:P

 

 

!image-2018-10-25-13-48-58-673.png!

!image-2018-10-25-13-49-13-334.png!

> [VFS] [sftp] The file type does not support 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}
> 
> org.apache.commons
> commons-vfs2
> 2.2
> 
> {code}
>Reporter: dingxbcn
>Priority: Minor
> 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
>
>
> 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:#FF}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)