file_store 1.0.2 copy "file_store: ^1.0.2" to clipboard
file_store: ^1.0.2 copied to clipboard

A file storage tool.

A file storage tool

Features #

  • Store the file, return the file ID, and read the file through the file ID;
  • Store multiple files into one file (Collection);

Getting started #

dart pub add file_store

Usage #

import 'package:file_store/file_store.dart';

void main(List<String> args) async {
  final store = FileStore("STORE");
  final f1 = await store.saveFileFromFilePath("./CHANGELOG.md");
  final collection = await store.createCollection();
  final f2 = await collection.addFileFromString("hello world");
  final f3 = await collection.addFileFromFilePath("./.gitignore");
  if (f1 != null) print(await store.readFileAsString(f1));
  print(await store.readFileAsString(f2));
  if (f3 != null) print(await store.readFileAsString(f3));
}

0
likes
140
points
35
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A file storage tool.

License

MIT (license)

Dependencies

path

More

Packages that depend on file_store