.map(function deleteNote (note) { const notePath = path.join(storage.path, 'notes', note.key + '.cson') return sander.unlink(notePath) .catch(function (err) { console.warn('Failed to delete', notePath, err) }) })
things.delete = function(id){ const origPath = path + id + '.json'; return sander.unlink(origPath) .then( () => { return {message:'deleted ' + id}; }); };
festivals.delete = function(resource){ const origPath = path + resource + '.json'; return sander.unlink(origPath) .then( () => { return {message:'deleted ' + resource}; }); };
}).then( () => { assert.deepEqual( result, [ { a: dest, format: 'cjs' }, { b: dest, format: 'cjs' } ]); return sander.unlink( dest ); });
things.update = function(id, obj){ const origPath = path + id + '.json'; const newPath = path + obj.id + '.json'; const objJson = JSON.stringify(obj); return sander.writeFile(newPath, objJson) .then(sander.unlink(origPath)) .then( () =>{ return obj; }); };
festivals.update = function(resource, obj){ const origPath = path + resource + '.json'; const newPath = path + obj.resource + '.json'; const objJson = JSON.stringify(obj); return sander.writeFile(newPath, objJson) .then(sander.unlink(origPath)) .then( () =>{ return obj; }); };
.then(() => sander.unlink(testFile));
}).then( () => { return sander.unlink( dest ); });
.then(() => { assert.deepEqual(result, [{ a: file, format: 'cjs' }, { b: file, format: 'cjs' }]); return sander.unlink(file); });
.then(() => { return sander.unlink(file); });