ES3Cloud.Sync

public static IEnumerator Sync(string filePath, string user, string password, ES3Settings settings)

Description

Synchronises a local file with the server.

  • If the local file is newer than the file on the server, or no file exists on the server:
    • The file on the server will be overwritten with the local file.
  • If the file on the server is newer than the local file, or no file exists locally:
    • The local file will be overwritten with the file on the server.

Note that all parameters are optional.

If no filePath parameter is provided, it will attempt to sync the default file.

If no user parameter is provided, the file will be global to all users.

For more information, see the Uploading and Downloading Files using ES3Cloud guide.

If using the ES3Cloud.Sync method on iOS you will need to declare that you are using File timestamp APIs using code C617.1 as Sync relies on this functionality in order to check whether the file on the server is newer than the one stored locally. For more information please see Apple’s documentation.

Parameters

filePath [Optional] The relative or absolute path of the local file we want to synchronise with the server.

user

[Optional] The name of the user this file belongs to, if we don't want the file to be global.

password

[Optional] The password of the user this file belongs to.

settings

[Optional] The settings we want to use to override the default settings.

Examples

C#

JS