JSPM

  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q53972F
  • License Apache-2.0

File system interface abstraction with implementations for GCP GCS, AWS S3, and Local filesystem

Package Exports

  • @wholebuzz/fs
  • @wholebuzz/fs/lib/fs
  • @wholebuzz/fs/lib/gcp
  • @wholebuzz/fs/lib/json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wholebuzz/fs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@wholebuzz/fs

FileSystem with atomic primitives enabling multiple readers and writers.

  • LocalFileSystem employs content hashing to approximate GCS Object Versioning.
  • GoogleCloudFileSystem provides consistent parallel access paterns.
  • S3FileSystem provides basic file system primitives.

Example

import { AnyFileSystem, GoogleCloudFileSystem, LocalFileSystem, S3FileSystem } from '@wholebuzz/fs'
import { readJSON, writeJSON } from '@whilebuzz/fs/lib/json'

const fs = new AnyFileSystem([
  { urlPrefix: 'gs://', fs: new GoogleCloudFileSystem() },
  { urlPrefix: 's3://', fs: new S3FileSystem() },
  { urlPrefix: '', fs: new LocalFileSystem() },
])

await writeJSON(fs, 's3://bucket/file', { foo: 'bar' })
const foobar = await readJSON(fs, 's3://bucket/file')

CLI

yarn build
node lib/cli.js ls .
node lib/cli.js --help

API Reference

@wholebuzz/fs / Exports

@wholebuzz/fs

Table of contents

Modules