uri-resolver

3.0.6 • Public • Published

npm semantic-release Build Status bithound codecov.io Coverage Status Code Climate Known Vulnerabilities GitHub Issues Stories in Ready Dependency Status devDependency Status docs downloads Commitizen friendly

uri-resolver

resolves uris and provides fs like access

API Reference

get(url) ⇒ Promise

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

Kind: global function
Fulfil: ReadableStream - of the file content

Param Type Description
url String of the a file

stat(url) ⇒ Promise

Read stat of a file assiciacted to a given file URL

Kind: global function
Fulfil: Object - as delivered by fs.stat()
Reject: Error - if url is not a file url or fs.stat() error

Param Type Description
url String of the a file

put(url) ⇒ Promise

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

Kind: global function
Fulfil: Void - undefined
Reject: Error - if url is not a file url

Param Type Description
url String of the a file

delete(url) ⇒ Promise

Deletes the file assiciacted to a given file URL

Kind: global function
Fulfil: Void - undefined
Reject: Error - as delivered by fs.unlink()

Param Type Description
url String of the a file

list(url) ⇒ Promise

List content of a directory

Kind: global function
Fulfil: String[] - file names
Reject: Error - as delivered by fs.readdir()

Param Type Description
url String of the a directory

schemeForURI(uri) ⇒ URIScheme

get URIScheme for a given uri

Kind: global function
Returns: URIScheme - for a given uri

Param Type
uri String

install

With npm do:

npm install uri-resolver

license

BSD-2-Clause

Readme

Keywords

Package Sidebar

Install

npm i uri-resolver

Weekly Downloads

2

Version

3.0.6

License

BSD-2-Clause

Last publish

Collaborators

  • arlac77