Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

dd-file-util

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dd-file-util

Simple File Utility

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

dd-file-util

Simple Log

It is a thing created to be used very privately.

Installation

$ npm install dd-file-util

How to use

const DDFileUtil = require('dd-file-util');

DDFileUtil.isExistFile('path/to/file');

Api

isExistFile

ファイルの存在確認

  • param (string) - filepath.
  • return (boolean) - result.

isDir

ディレクトリであるかのチェック

  • param (string) - filepath.
  • return (boolean) - result.

pathList

指定のパス直下のパス一覧を取得 type: 0 -> 全て, 1 -> ファイルのみ, 2 -> ディレクトリのみ

  • param (string, string) - dirPath, type
  • return (Array) - result.

fileList

指定のパス直下のファイル一覧を取得

  • param (string) - dirPath
  • return (Array) - result.

dirList

指定のパス直下のディレクトリ一覧を取得

  • param (string) - dirPath
  • return (Array) - result.

getPathList

指定のディレクトリ直下の全てのパス一覧を規定のオブジェクト形式のリストで取得(再帰)

  • param (string) - dirPath
  • return (Array) - [{dir: ディレクトリ, filename: ファイル名, filepath: パス},...]

Keywords

file

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts