file DELETE support

This commit is contained in:
Wes Thomas
2016-02-10 18:42:21 -05:00
parent c66cc8d7bc
commit a75376523c
5 changed files with 142 additions and 0 deletions

View File

@@ -20,6 +20,17 @@ export class GridStoreAdapter extends FilesAdapter {
});
}
deleteFile(config, filename) {
return config.database.connect().then(() => {
let gridStore = new GridStore(config.database.db, filename, 'w');
return gridStore.open();
}).then((gridStore) => {
return gridStore.unlink();
}).then((gridStore) => {
return gridStore.close();
});
}
getFileData(config, filename) {
return config.database.connect().then(() => {
return GridStore.exist(config.database.db, filename);