uri-resolver
v3.0.6
Published
resolves uris and provides fs like access
Downloads
9
Readme
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