Feature: walker function: walker(".") returns an object model of the entire directory / an expansive alternative for scandir()
オープン
まだ誰も着手していません。
Feature
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
Here is my current code for demonstrating the purpose. The dev community shall decide on the final verdict.
<?php
function walker($directory) {
foreach (scandir($directory) as $item) {
if ($item == '.' || $item == '..') continue;
if ($directory == "." && ($item == "api.php" || $item == 'index.html')) continue;
$dl[$item] = [
"item_type" => is_dir("{$directory}/{$item}") ? "folder" : "file",
"child" => walker("{$directory}/{$item}"),
];
}
return $dl;
}
?>
Here's how I'm currently using it :) with some html css and js
How it looks like when I use echo and json_encode.
I'll be making a pull request if it got a lot of good impressions.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、再帰的なディレクトリ走査を行うために提案されている walker($directory) の例と、その想定オブジェクトモデルを確認します。要求を既存の scandir() の動作と比較し、具体的な PHP API、スコープ、完了基準を定義できるか判断してください。この issue では現在、ソースファイルもテストも指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100