
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