fs-resolver-fs

7.0.1 • Public • Published

styled with prettier Known Vulnerabilities Commitizen friendly npm License minified size downloads GitHub Issues Build Status codecov.io Coverage Status Greenkeeper semantic-release

fs-resolver-fs

resolves file urls

API

Table of Contents

FileScheme

Extends URLScheme

URLScheme for file system access

get

Creates a readable stream for the content of th file associated to a given file URL

Parameters

  • context Context execution context
  • url URL of the a file
  • options (Object | string) passed as options to fs.createReadStream()

Returns ReadableStream of the file content

stat

Read stat of a file assiciated to a given file URL

Parameters

  • context Context execution context
  • url URL of the a file
  • options Object unused for now

Returns (Object | Error) as delivered by fs.stat()

put

Put content of a stream to a file associated to a given file URL

Parameters

  • context {Context} execution context
  • url {URL} of the a file
  • stream {Stream} data source
  • options (Object | string) passed as options to fs.createWriteStream()

Returns (undefined | Error) if url is not a file url

delete

Deletes the file assiciated to a given file URL

Parameters

  • context Context execution context
  • url URL of the a file

Returns (Object | Error) as delivered by fs.unlink()

list

List content of a directory

Parameters

  • context Context execution context
  • url URL of the a directory
  • options Object unused for now

Returns Iterator

name

Scheme name if 'file'

Returns string 'file'

install

With npm do:

npm install fs-resolver-fs

license

BSD-2-Clause

Package Sidebar

Install

npm i fs-resolver-fs

Weekly Downloads

36

Version

7.0.1

License

BSD-2-Clause

Unpacked Size

10.2 kB

Total Files

4

Last publish

Collaborators

  • arlac77