You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Lyor Goldstein (Jira)" <ji...@apache.org> on 2022/04/22 06:33:00 UTC
[jira] [Comment Edited] (SSHD-1263) I want to get current dir's path ( like `pwd` ) when change dir with `cd` in channel write method
[ https://issues.apache.org/jira/browse/SSHD-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526223#comment-17526223 ]
Lyor Goldstein edited comment on SSHD-1263 at 4/22/22 6:32 AM:
---------------------------------------------------------------
I think there is a misunderstanding here - SFTP has no such concept as CWD (current working directory). It is an +illusion+ (so to speak) provided by the STFP client software that wraps the SFTP protocol and tracks your current "working directory" in order to provide you with a convenient user experience. Furthermore, there is no such concept as a "command" in SFTP - again, it is an illusion provided by the STFP client software. To answer your question though - no, there is no +standard+ way to do what you are asking via SFTP (in view of what I have just explained)
was (Author: lgoldstein):
I think there is a misunderstanding here - SFTP has no such concept as CWD (current working directory). It is an +illusion +(so to speak) provided by the STFP client software that wraps the SFTP protocol and tracks your current "working directory" in order to provide you with a convenient user experience. Furthermore, there is no such concept as a "command" in SFTP - again, it is an illusion provided by the STFP client software. To answer your question though - no, there is no +standard+ way to do what you are asking via SFTP (in view of what I have just explained)
> I want to get current dir's path ( like `pwd` ) when change dir with `cd` in channel write method
> -------------------------------------------------------------------------------------------------
>
> Key: SSHD-1263
> URL: https://issues.apache.org/jira/browse/SSHD-1263
> Project: MINA SSHD
> Issue Type: Wish
> Reporter: g3g4x5x6
> Priority: Major
> Attachments: image-2022-04-22-08-53-58-243.png
>
>
> Q: any method can do it in channel or sftpsystem?
> something like this:
> {code:java}
> // always get current dir path when change dir with command `cd XXX` in channel
> public String getCurrentDirPathWithChannel(){
> return `pwd`;
> }{code}
> !image-2022-04-22-08-53-58-243.png!
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org