This package has been deprecated

Author message:

This module is no longer maintained

good-file

6.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i good-file

Weekly Downloads

559

Version

6.0.1

License

BSD-3-Clause

Last publish

Collaborators

  • arb
  • lloydbenson