Skip to main content
Home

latest

file storage

This package works with Deno
This package works with Deno
JSR Score
64%
Published
a year ago (1.0.2)

A user-friendly file manager

Usage


import { FileManager, FileStore } from "@zyc/file-service"";

async function storeExample() {
	const files = new FileStore(".files");
	const stream = await FileStore.getReadableStreamByFilePath("./1.exe");
	if (stream) console.log(await files.save(stream));
}

async function managerExample() {
	const files = new FileManager(".file-db");
	const stream = await FileStore.getReadableStreamByFilePath("./1.exe");
	if (stream) console.log(await files.add(stream, { name: "1.exe" }));
}

storeExample();

managerExample();

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@zone/file-service

Import symbol

import * as file_service from "@zone/file-service";
or

Import directly with a jsr specifier

import * as file_service from "jsr:@zone/file-service";