AspectUnk / russh-sftp

SFTP subsystem supported server and client for Russh
Apache License 2.0
64 stars 21 forks source link

How to change working directory #25

Closed Andycharalambous closed 6 months ago

Andycharalambous commented 6 months ago

Stupid question but how do you change the working directory? I can see every other possible operation in SftpSession except for one that can issue the equivalent of "cd ".

AspectUnk commented 6 months ago

Hello. In the context of a library, a separate implementation of the "cd" command is not necessary, as it typically does two things: first, it sends a request for path canonicalization, and then it sends a request to retrieve metadata. The task of the library is to provide simple access to sending/receiving and readability of data. Implementation of the "current directory", and etc. for graphical or CI clients remains on their side. Don't hesitate to ask if you have any more questions. 😉