$fn.getFileNames(path)
指定ディレクトリパスにあるファイル名のリストを取得します。[非同期]
引数
名前 | 型 | 説明 |
---|---|---|
path | string | 取得するディレクトリのパス |
戻り値
型 | 説明 |
---|---|
array of string | ターゲットディレクトリ内のファイル名のリスト |
サンプル
try { const files = await $fn.getFileNames('/folder1');} catch (err) { console.log("Error", err);}