Handling of Solid pod files interaction. Deletions, saves, feedback on failed permissions etc.
- Source:
Members
(static, constant) deleteFile
Tries to delete a Solid Pod file hosted at uri.
- Source:
(static, constant) hasPermissions
Returns whether a user has read/write permissions to the resource under given uri.
- Source:
Methods
(static) changePermissions(uri, permissions) → {Promise.<void>}
Changes the permissions of a file at the given URI by modifying the file's .acl.
Parameters:
Name | Type | Description |
---|---|---|
uri |
||
permissions |
- Source:
Returns:
- Type
- Promise.<void>
(static) fetchFile(url) → {Promise.<*>}
Downloads a file using the Solid auth client.
Notifies the user if they're unauthorized.
Parameters:
Name | Type | Description |
---|---|---|
url |
- Source:
Returns:
- Type
- Promise.<*>
(static) getFileUrl(relativePath) → {Promise.<string>}
Returns absolute file URL for provided relative path based on user's Solid Pod.
Parameters:
Name | Type | Description |
---|---|---|
relativePath |
- Source:
Returns:
- Type
- Promise.<string>
(static) loadFiles(url) → {Promise.<void>}
Fetches file and folder definitions from user's Solid Pod.
Parameters:
Name | Type | Description |
---|---|---|
url |
- Source:
Returns:
- Type
- Promise.<void>
(static) saveFile(uri, data) → {Promise.<*>}
Saves the file using the Solid auth client to the given uri.
If fail saves, retries a given number of times.
Parameters:
Name | Type | Description |
---|---|---|
uri |
||
data |
- Source:
Returns:
- Type
- Promise.<*>
(static) saveViewByUri(uri, permissions) → {Promise.<void>}
Saves the current project at given uri.
Sets permissions if provided.
Parameters:
Name | Type | Description |
---|---|---|
uri |
||
permissions |
- Source:
Returns:
- Type
- Promise.<void>
(inner) notifyAboutFailureWithRetry(retryFn, uri) → {Promise.<unknown>}
Notifies the user that a save try has failed.
Retries the save command multiple times.
Parameters:
Name | Type | Description |
---|---|---|
retryFn |
||
uri |
- Source:
Returns:
- Type
- Promise.<unknown>
(async, inner) notifyUnauthorized() → {Promise.<void>}
Notifies the user that they are not authorized to use a requested resource.
- Source:
Returns:
- Type
- Promise.<void>