sshnet / sshnet/SSH.NET

Current Directory and Parent Directory returned by ListDirectory.

オープン
#331 コメント 0 件 リアクション 9 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
4.4k
フォーク
993
平均マージ
9日 21時間
マージ済み PR(30日)
1

説明

Running sftpClient.ListDirectory(path) returns values . and ...
Whilst this is valid behaviour, special consideration has to be given whenever using this command to determine if we want these "relative-folders". There's also no flag (e.g. IsRelative) to easily filter; rather we have to filter on the folder's name to detect / exclude these.

$client.ListDirectory('/files') | Format-Table Name, Is* -AutoSize
Name                      IsSocket IsSymbolicLink IsRegularFile IsBlockDevice IsDirectory IsCharacterDevice IsNamedPipe
----                      -------- -------------- ------------- ------------- ----------- ----------------- -----------
..                           False          False         False         False        True             False       False
out                          False          False         False         False        True             False       False
.                            False          False         False         False        True             False       False
in                           False          False         False         False        True             False       False

Adding an option to hide these (either on the call to ListDirectory, or as a preference for the SftpClient itself would be helpful; or simply providing an IsRelative property on the SftpFile class to allow easy discrimination.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ListDirectory のエントリポイントから開始し、issue に示されている SftpFile 表現を調べます。要求されたフィルタリングオプションを IsRelative 形式の判別子と比較し、選択した動作によって呼び出し側が名前ベースのフィルタリングなしに . と .. を除外できることを確認します。完了の条件は、API が両方のエントリを非表示にするか識別するための、文書化されテスト可能な方法を公開していることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
networking
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。