# skipfile

> Append data, seek forward and seek backward inside a binary file.

Latest version **0.1.0** (published 2014-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install skipfile
pnpm add skipfile
yarn add skipfile
bun add skipfile
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-08-08 |
| First published | 2014-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hij1nx |
| Maintainers | hij1nx |

## Links

- npm: https://www.npmjs.com/package/skipfile
- npm.io page: https://npm.io/package/skipfile

## Dependencies (1)

- [varint](https://npm.io/package/varint.md) ^3.0.0

## Recent versions

- 0.1.0 (latest) — 2014-08-08

## README

# SYNOPSIS
Append data, seek forward and seek backward inside a binary file.

# API
## CONSTRUCTOR

Using `new Skipfile()` or `Skipfile()` will create a new 
instance. The constructor accepts an options object. 
`{ filename: path }` specifies the target file to read and 
write to.

## INSTANCE METHODS
### append(value, callback)
Appends a value to the file specified in the constructor.

```javascript
var skip = Skipfile(function(err) {
  skip.append(randomData(), function(err, offset) {
  });
});
```

### forward(bytes, callback)
Seeks forward from `bytes`.

```javascript
var skip = Skipfile(function(err) {

  -function forward(pos) {
    skip.forward(pos, function(err, seq, len, offset, val) {
      if (val) forward(offset + 1);
    });
  }(0);
});
```

### backward(bytes, callback)
Seeks backward from `bytes`.

```javascript
var skip = Skipfile(function(err) {

  -function backward(pos) {
    skip.backward(pos, function(err, seq, len, offset, val) {
      if (val) backward(offset);
    });
  }(skip.size);
});
```

### close(callback)
Closes the file descriptor opened by the constructor.

```javascript
skip.close(function(err) {
});
```

## INSTANCE MEMBERS
### size
Tracks the size of the file opened by the constructor.

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