Use the chrome.syncFileSystem API to save and synchronize data on Google Drive. This API is NOT for accessing arbitrary user docs stored in Google Drive. It provides app-specific syncable storage for offline and caching usage so that the same data can be available across different clients. Read Manage Data for more on using this API.
Use the chrome.syncFileSystem API to save and synchronize data on Google Drive. This API is NOT for accessing arbitrary user docs stored in Google Drive. It provides app-specific syncable storage for offline and caching usage so that the same data can be available across different clients. Read Manage Data for more on using this API. * available since Chrome 27 * https://developer.chrome.com/apps/syncFileSystem
(get-conflict-resolution-policy)
Gets the current conflict resolution policy.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [policy] where:
|policy| - https://developer.chrome.com/apps/syncFileSystem#property-callback-policy.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy.
Gets the current conflict resolution policy. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [policy] where: |policy| - https://developer.chrome.com/apps/syncFileSystem#property-callback-policy. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy.
(get-file-status file-entry)
Returns the 'FileStatus' for the given fileEntry. The status value can be 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only happens when the service's conflict resolution policy is set to 'manual'.
|file-entry| - https://developer.chrome.com/apps/syncFileSystem#property-getFileStatus-fileEntry.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [status] where:
|status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus.
Returns the 'FileStatus' for the given fileEntry. The status value can be 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only happens when the service's conflict resolution policy is set to 'manual'. |file-entry| - https://developer.chrome.com/apps/syncFileSystem#property-getFileStatus-fileEntry. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [status] where: |status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus.
(get-file-statuses file-entries)
Returns each 'FileStatus' for the given fileEntry array. Typically called with the result from dirReader.readEntries().
|file-entries| - https://developer.chrome.com/apps/syncFileSystem#property-getFileStatuses-fileEntries.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [status] where:
|status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses.
Returns each 'FileStatus' for the given fileEntry array. Typically called with the result from dirReader.readEntries(). |file-entries| - https://developer.chrome.com/apps/syncFileSystem#property-getFileStatuses-fileEntries. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [status] where: |status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses.
(get-service-status)
Returns the current sync backend status.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [status] where:
|status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus.
Returns the current sync backend status. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [status] where: |status| - https://developer.chrome.com/apps/syncFileSystem#property-callback-status. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus.
(get-usage-and-quota file-system)
Returns the current usage and quota in bytes for the 'syncable' file storage for the app.
|file-system| - https://developer.chrome.com/apps/syncFileSystem#property-getUsageAndQuota-fileSystem.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [info] where:
|info| - https://developer.chrome.com/apps/syncFileSystem#property-callback-info.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota.
Returns the current usage and quota in bytes for the 'syncable' file storage for the app. |file-system| - https://developer.chrome.com/apps/syncFileSystem#property-getUsageAndQuota-fileSystem. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [info] where: |info| - https://developer.chrome.com/apps/syncFileSystem#property-callback-info. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota.
(request-file-system)
Returns a syncable filesystem backed by Google Drive. The returned DOMFileSystem instance can be operated on in the same way as the Temporary and Persistant file systems (see http://dev.w3.org/2009/dap/file-system/file-dir-sys.html).Calling this multiple times from the same app will return the same handle to the same file system.Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [file-system] where:
|file-system| - https://developer.chrome.com/apps/syncFileSystem#property-callback-fileSystem.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem.
Returns a syncable filesystem backed by Google Drive. The returned DOMFileSystem instance can be operated on in the same way as the Temporary and Persistant file systems (see http://dev.w3.org/2009/dap/file-system/file-dir-sys.html).Calling this multiple times from the same app will return the same handle to the same file system.Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [file-system] where: |file-system| - https://developer.chrome.com/apps/syncFileSystem#property-callback-fileSystem. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem.
(set-conflict-resolution-policy policy)
Sets the default conflict resolution policy for the 'syncable' file storage for the app. By default it is set to 'last_write_win'. When conflict resolution policy is set to 'last_write_win' conflicts for existing files are automatically resolved next time the file is updated. |callback| can be optionally given to know if the request has succeeded or not.
|policy| - https://developer.chrome.com/apps/syncFileSystem#property-setConflictResolutionPolicy-policy.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy.
Sets the default conflict resolution policy for the 'syncable' file storage for the app. By default it is set to 'last_write_win'. When conflict resolution policy is set to 'last_write_win' conflicts for existing files are automatically resolved next time the file is updated. |callback| can be optionally given to know if the request has succeeded or not. |policy| - https://developer.chrome.com/apps/syncFileSystem#property-setConflictResolutionPolicy-policy. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.sync-file-system namespace.
Taps all valid non-deprecated events in chromex.app.sync-file-system namespace.
(tap-on-file-status-changed-events channel & args)
Fired when a file has been updated by the background sync service.
Events will be put on the |channel| with signature [::on-file-status-changed [detail]] where:
|detail| - https://developer.chrome.com/apps/syncFileSystem#property-onFileStatusChanged-detail.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged.
Fired when a file has been updated by the background sync service. Events will be put on the |channel| with signature [::on-file-status-changed [detail]] where: |detail| - https://developer.chrome.com/apps/syncFileSystem#property-onFileStatusChanged-detail. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged.
(tap-on-service-status-changed-events channel & args)
Fired when an error or other status change has happened in the sync backend (for example, when the sync is temporarily disabled due to network or authentication error).
Events will be put on the |channel| with signature [::on-service-status-changed [detail]] where:
|detail| - https://developer.chrome.com/apps/syncFileSystem#property-onServiceStatusChanged-detail.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged.
Fired when an error or other status change has happened in the sync backend (for example, when the sync is temporarily disabled due to network or authentication error). Events will be put on the |channel| with signature [::on-service-status-changed [detail]] where: |detail| - https://developer.chrome.com/apps/syncFileSystem#property-onServiceStatusChanged-detail. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close