# growing-file

> A readable file stream for files that are growing.

Latest version **0.1.3** (published 2011-07-04) · 0 weekly downloads

## Install

```sh
npm install growing-file
pnpm add growing-file
yarn add growing-file
bun add growing-file
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2011-07-04 |
| First published | 2011-04-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 106 |
| Author | Felix Geisendörfer |

## Links

- npm: https://www.npmjs.com/package/growing-file
- Repository: https://github.com/felixge/node-growing-file
- npm.io page: https://npm.io/package/growing-file

## Dependencies (1)

- [oop](https://npm.io/package/oop.md) 0.0.3

## Recent versions

- 0.1.3 (latest) — 2011-07-04
- 0.1.2 — 2011-07-04
- 0.1.1 — 2011-04-05

## README

# node-growing-file

## Purpose

Sometimes you need to read from a file that is still being written to by another
process. This library provides a readable stream that keeps reading until the
file has been idle for a certain time.

## Current status

This module is still fresh. Try it while it's hot.

## Installation

    npm install growing-file

## Usage

```js
var file = GrowingFile.open('my-growing-file.dat');
file.pipe(<some writeable stream>);
```

**Note:** The file does not have to exist yet when invoking this method. An
`'error'` event is emitted if it is not created within the configured `timeout`.

## Options

`GrowingFile.create` accepts an `options` array.

```js
var file = GrowingFile.open(path, options);
```

Where `options` defaults to:

```js
{
    timeout: 3000,
    interval: 100,
    startFromEnd: false
}
```

Time values are given in ms.

* `timeout` determines after what time a file is considered to be done growing.
* `interval` specifies the frequency at which the file is being polled for changes.
* `startFromEnd` starts the read stream from the currently last byte.

## License

Written by Felix Geisendörfer, licensed under the MIT license.

---
_Source: https://npm.io/package/growing-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
