fs-resolver-fs
v7.0.1
Published
resolves file urls
Downloads
150
Readme
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 contexturl
URL of the a fileoptions
(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
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 contexturl
{URL} of the a filestream
{Stream} data sourceoptions
(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 contexturl
URL of the a file
Returns (Object | Error) as delivered by fs.unlink()
list
List content of a directory
Parameters
Returns Iterator
name
Scheme name if 'file'
Returns string 'file'
install
With npm do:
npm install fs-resolver-fs
license
BSD-2-Clause