Simple Log
It is a thing created to be used very privately.
$ npm install dd-file-util
const DDFileUtil = require('dd-file-util');
DDFileUtil.isExistFile('path/to/file');
ファイルの存在確認
-
param (
string
) - filepath. -
return (
boolean
) - result.
ディレクトリであるかのチェック
-
param (
string
) - filepath. -
return (
boolean
) - result.
指定のパス直下のパス一覧を取得 type: 0 -> 全て, 1 -> ファイルのみ, 2 -> ディレクトリのみ
-
param (
string
,string
) - dirPath, type -
return (
Array
) - result.
指定のパス直下のファイル一覧を取得
-
param (
string
) - dirPath -
return (
Array
) - result.
指定のパス直下のディレクトリ一覧を取得
-
param (
string
) - dirPath -
return (
Array
) - result.
指定のディレクトリ直下の全てのパス一覧を規定のオブジェクト形式のリストで取得(再帰)
-
param (
string
) - dirPath -
return (
Array
) - [{dir: ディレクトリ, filename: ファイル名, filepath: パス},...]