コード例 #1
0
ファイル: deleteFolder.js プロジェクト: twocngdagz/Boostnote
 .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)
     })
 })
コード例 #2
0
things.delete = function(id){
  const origPath = path + id + '.json';
  return sander.unlink(origPath)
  .then( () => {
    return {message:'deleted ' + id};
  });
};
コード例 #3
0
festivals.delete = function(resource){

  const origPath = path + resource + '.json';
  return sander.unlink(origPath)
  .then( () => {
    return {message:'deleted ' + resource};
  });
};
コード例 #4
0
ファイル: test.js プロジェクト: cristicVictory/rollup
			}).then( () => {
				assert.deepEqual( result, [
					{ a: dest, format: 'cjs' },
					{ b: dest, format: 'cjs' }
				]);

				return sander.unlink( dest );
			});
コード例 #5
0
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;
  });
};
コード例 #6
0
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;
  });
};
コード例 #7
0
 .then(() => sander.unlink(testFile));
コード例 #8
0
ファイル: test.js プロジェクト: cristicVictory/rollup
			}).then( () => {
				return sander.unlink( dest );
			});
コード例 #9
0
ファイル: index.js プロジェクト: tivac/rollup
			.then(() => {
				assert.deepEqual(result, [{ a: file, format: 'cjs' }, { b: file, format: 'cjs' }]);

				return sander.unlink(file);
			});
コード例 #10
0
ファイル: index.js プロジェクト: tivac/rollup
			.then(() => {
				return sander.unlink(file);
			});