-
Notifications
You must be signed in to change notification settings - Fork 1
Sync files via Redunda
You can easily get the DataService with the same API-key as PingService:
DataService redundaData = redunda.buildDataService();
Each file that should be automatically synchronized needs to be tracked:
redundaData.trackFile("./myFile");
Note: You should not use absolute paths and a path should not contain the String _slash_.
The automatic sync can be started like this:
redundaData.syncAndStart();
This will call syncFiles() synchronously (for proper initialization of your bot) and then start the background thread. Alternatively, you can use start() if you don't need the files on launch.
If you don't want to sync automatically in background, you can just call syncFiles().
If you don't want to sync automatically, you can call the methods for uploading and downloading by yourself. They are the same as syncFiles() uses. Please have a look at the documentation for more information.