Socket
Socket
Sign inDemoInstall

good-file

Package Overview
Dependencies
16
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    good-file

Basic write stream that ensures destination exists before opening for writing.


Version published
Weekly downloads
669
increased by11.13%
Maintainers
2
Install size
324 kB
Created
Weekly downloads
 

Readme

Source

good-file

Simple Node write stream to write to a file.

Build StatusCurrent Version

Lead Maintainer: Adam Bretz

Good File

This is a basic write stream wrapper of Node core Fs.createWriteStream(). The advantage is GoodFile will create the file and directory if they do not already exist.

new GoodFile (path, options)

Creates a new GoodFile write stream.

  • path a string for the file to write to. Will be created only if needed.
  • [options] optional file stream options. Defaults to { encoding: 'utf8', flags: 'a', mode: 0o666 }. fd will always default to -1 during object construction. For more information about options, refer to the Node documentation

Rotation

If you're looking for a stream with built-in rotation options, please check out stream-rotate or rotating-file-stream. good-file no longer does file rotation because there are better ways to deal with log rotation at the operating system level.

FAQs

Last updated on 02 May 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc