Liking cljdoc? Tell your friends :D

chromex.app.sync-file-system

clj

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 36
  * https://developer.chrome.com/apps/syncFileSystem
raw docstring

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-conflict-resolution-policyclj/smacro

(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.
sourceraw docstring

get-conflict-resolution-policy*cljs

(get-conflict-resolution-policy* config)
source

get-file-statusclj/smacro

(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.
sourceraw docstring

get-file-status*cljs

(get-file-status* config file-entry)
source

get-file-statusesclj/smacro

(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.
sourceraw docstring

get-file-statuses*cljs

(get-file-statuses* config file-entries)
source

get-service-statusclj/smacro

(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.
sourceraw docstring

get-service-status*cljs

(get-service-status* config)
source

get-usage-and-quotaclj/smacro

(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.
sourceraw docstring

get-usage-and-quota*cljs

(get-usage-and-quota* config file-system)
source

on-file-status-changed*cljs

(on-file-status-changed* config channel & args)
source

on-service-status-changed*cljs

(on-service-status-changed* config channel & args)
source

request-file-systemclj/smacro

(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.
sourceraw docstring

request-file-system*cljs

(request-file-system* config)
source

set-conflict-resolution-policyclj/smacro

(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.
sourceraw docstring

set-conflict-resolution-policy*cljs

(set-conflict-resolution-policy* config policy)
source

tap-all-eventsclj/smacro

(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.
sourceraw docstring

tap-on-file-status-changed-eventsclj/smacro

(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.
sourceraw docstring

tap-on-service-status-changed-eventsclj/smacro

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close