Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dir-output

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

dir-output

An interface for managing a dir.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

dir-output

An interface for managing a dir.

  • dir-output
    • ~DirOutput
      • new DirOutput(outputPath)
      • .remove(file)Promise
      • .createDir(name, empty)Promise
      • .empty()Promise

dir-output~DirOutput

DirOutput class

Kind: inner class of dir-output

new DirOutput(outputPath)
ParamDescription
outputPathThe path to the dir.

dirOutput.remove(file) ⇒ Promise

Remove a file or recursively remove a dir. Returns true if file was deleted, and false if file did not exist.

Kind: instance method of DirOutput
Fulfil: boolean

ParamTypeDescription
filestringThe name of the dir.

dirOutput.createDir(name, empty) ⇒ Promise

Creates a dir. If this dir was scheduled to be deleted by a empty operation, this dir is not deleted. Returns a DirOutput with the outputPath being the path of the dir that was created.

Kind: instance method of DirOutput
Fulfil: DirOutput

ParamTypeDefaultDescription
namestringThe name of the dir.
emptybooleantrueWhether or not to empty the dir if it was preserved instead of deleted.

dirOutput.empty() ⇒ Promise

Remove all files and dirs in the output dir.

Kind: instance method of DirOutput
Fulfil: void

FAQs

Package last updated on 23 Dec 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc