Skip to content

A file splitting & merging solution

License

Notifications You must be signed in to change notification settings

alpheustangs/filego.js

Repository files navigation

FileGo

A file splitting & merging solution.

Installation

For JavaScript/TypeScript environment:

npm:

npm i @filego/js

Yarn:

yarn add @filego/js

pnpm:

pnpm add @filego/js

For Node environment:

npm:

npm i @filego/node

Yarn:

yarn add @filego/node

pnpm:

pnpm add @filego/node

Quick Start

Split file from a path to a directory directly with split function in @filego/node.

import { split } from "@filego/node";

await split({
    inFile: "/path/to/file.txt",
    outDir: "/path/to/dir",
    chunkSize: 2 * 1024 * 1024,
});

For the usage of @filego/js, please refer to docs/js.md.

For the usage of @filego/node, please refer to docs/node.md.

Examples

Check out the Web and API examples:

For the example of web in React, please refer to examples/web.

For the example of Node in Fastify, please refer to examples/node.

License

This project is MIT licensed, you can find the license file here.