opened
abonec
username_0
Is there feature to delete installed update?
Need feature to delete installed update
issue
created
macdonst
username_1
@username_0 do you mean remove all the content at a sync location or roll back the latest merge?
comment
created
abonec
username_0
I mean delete whole directory with downloaded and extracted update by ID or by full path.
comment
created
macdonst
username_1
As of 1.2.0 of the plugin both Android & iOS store their data in the path represented by `cordova.file.dataDirectory` so you can use the File plugin to remove your cached data.

```
window.resolveLocalFileSystemURL(cordova.file.dataDirectory + id, function (dirEntry) {
  dirEntry. removeRecursively(function() {
    // success
  }, function(error) {
    // error
  });
} function(e) {
  // handle error
});
```
comment
created
CookieCookson
username_2
Would there be a way in the future to have this functionality included without requiring the file plugin? I'm using the id as a way of keeping track what update version is running, so would be awesome if there was a function which 'cleans up' old IDs.
comment
created
burin
username_3
I think being able to clear cached data would be nice too (although using the File plugin works too). I need to do the same thing as @username_2 (clear "old" ids)

I imagined the API would be similar to the `ionic-plugin-deploy` methods `getVersions` and `deleteVersion`:

https://github.com/driftyco/ionic-plugin-deploy/blob/master/www/ionicdeploy.js#L65
comment
created
tripodsan
username_4
maybe the contentsync plugin should keep a history/manifest of synced updates. eg:

contentsync.json
```
{
	"appid-1": {
		"src": "http://some.server.com/update-package.zip",
		"localPath": "..../files/appid-1",
		"lastUpdate": 12341234123,
		"lastSyncType": "merge"
	},
	"appid-2": {
		"src": "http://some.server.com/update-package.zip?v=2",
		"localPath": "..../files/appid-2",
		"lastUpdate": 12341234126,
		"lastSyncType": "replace"
	},
	"deep/appid/1.0": {
		"localPath": "..../files/deep/appid/1.0",
		"lastUpdate": 12341234126,
		"lastSyncType": "local",
		"copyRootApp": true
	}
}
```

and then offer a method to retrieve this list. delete could be done with a new sync type `delete` which wouldn't require a `src`.
comment
created
imhotep
username_5
I have a feeling that the plugin already does too much. We could offer the functionality to delete old synced folders but we might end up with a full replacement of the File plugin and I am not sure we want that.
comment