File related functions.
- Source:
Methods
(static) load(url, cb, methodopt, dataopt)
Loads a file from filesystem when run on Node.js or use XMLHttpRequest for downloading its content on browser.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string | Position of the file to be loaded. | ||
cb |
Bravey.File.loadCallback | Callback called after the file is loaded. | ||
method |
string |
<optional> |
"get" | get or post |
data |
object |
<optional> |
Data to be sent |
- Source:
- To Do:
-
- Implements get/post and data sending.
Type Definitions
loadCallback(text)
Called when the file loader data is ready.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The returned file content or undefined on error. |
- Source: