code: function deleteItem(entry) {
          var result = new $.Deferred();
  
          entry.moveToTrash(function (err) {
              if (!err) {
                  DocumentManager.notifyPathDeleted(entry.fullPath);
                  result.resolve();
              } else {
                  _showErrorDialog(ERR_TYPE_DELETE, entry.isDirectory, FileUtils.getFileErrorString(err), entry.fullPath);
  
                  result.reject(err);
              }
          });
  
          return result.promise();
      }
docs: Delete file or directore from project
  @param {!(File|Directory)} entry File or Directory to delete