DELETE /exports/1
 DELETE /exports/1.json
482578
def destroy
      @export = Export.find(params[:id])

      # remove from Resque
      Resque.remove_schedule(@export.schedule_name)

      @export.destroy

      respond_to do |format|
        format.html { redirect_to exports_url }
        format.json { head :no_content }
      end
    end
1276806
function deleteFiles(files) {
	_.castArray(files).forEach(file => {
		if (!fs.existsSync(file)) {
			return;
		}

		log.removed(`Delete ${file}`);
		fs.removeSync(file);
	});
}
339199
function _copyPackageJson(from, to) {
  return new Promise((resolve, reject) => {
    const origin = path.join(from, 'package.json');
    const destination = path.join(to, 'package.json');
    let data = JSON.parse(fs.readFileSync(origin, 'utf-8'));
    delete data.engines;
    delete data.scripts;
    delete data.devDependencies;
    fs.writeFileSync(destination, JSON.stringify(data, null, 2));
    resolve();
  });
}
1301633
def _api_delete(path, data, server=None):
    '''
    
    '''
    server = _get_server(server)
    response = requests.delete(
            url=_get_url(server['ssl'], server['url'], server['port'], path),
            auth=_get_auth(server['user'], server['password']),
            headers=_get_headers(),
            params=data,
            verify=False
    )
    return _api_response(response)
455408
function removeExisting ()
{
    if (fs.existsSync("web/assets"))
    {
        var stat = fs.lstatSync("web/assets");

        if (stat.isFile() || stat.isSymbolicLink())
        {
            fs.unlinkSync("web/assets");
        }
        else
        {
            wrench.rmdirSyncRecursive("web/assets");
        }
    }
}
920842
protected function deleteTmpDir() {
		// Cleanup temporary directory, if any
		if ( ! empty( $this->tmpDir ) ) {
			\Pressbooks\Utility\rmrdir( $this->tmpDir );
		}
		// Cleanup deprecated junk, if any
		$exports_folder = untrailingslashit( pathinfo( $this->outputPath, PATHINFO_DIRNAME ) );
		if ( ! empty( $exports_folder ) ) {
			\Pressbooks\Utility\rmrdir( "{$exports_folder}/META-INF" );
			\Pressbooks\Utility\rmrdir( "{$exports_folder}/media" );
		}
	}
133047
function (done) {
      var p = clone(pkg);
      delete p.devDependencies;
      var content = JSON.stringify(p, null, 2);
      write_if_not_exists('package.json', content, done);
    }
1292535
function skip() {
    rimraf(file, function() {})
    delete f.versions[v]
    if (f._attachments)
      delete f._attachments[file]
    need.splice(need.indexOf(v), 1)
    maybeDone(null)
  }
785633
function optimizePackageConfig(json) {
  if (json.systemjs)
    json = json.systemjs;

  // remove non SystemJS package config properties
  var loaderConfigProperties = ['baseDir', 'defaultExtension', 'format', 'meta', 'map', 'main'];
  for (var p in json)
    if (loaderConfigProperties.indexOf(p) == -1)
      delete json[p];

  if (json.map && !json.map['@env']) {
    Object.keys(json.map).forEach(function(target) {
      var mapped = json.map[target];

      if (typeof mapped == 'string' && mapped.substr(0, 6) == '@node/')
        delete json.map[target];

      if (typeof mapped == 'object') {
        Object.keys(mapped).forEach(function(condition) {
          if (condition == 'node')
            delete mapped[condition];
        });
        if (!hasProperties(mapped))
          delete json.map[target];
      }
    });

    if (!hasProperties(json.map))
      delete json.map;
  }

  return json;
}
924060
function end() {
  var group = stack.pop();
  if (!requests) return;
  var data = JSON.stringify(requests);
  var dest = path.join(options.fixtures, group + '.json');
  fs.writeFileSync(dest, data, 'utf8');
  requests = null;
}
872742
function removePackageFile(){
  const homeCwd = home.getHomePath();
  const pkgPath = path.join(homeCwd, 'package.json');
  if (!fs.existsSync(pkgPath)) return;
  fs.remove(pkgPath);
}
66024
function(callback) {
			fs.stat(outputFile,function(err,stat) {
				if (err) { return callback(null) }
				console.log('Found old ' + outputFile + ' so now removing')
				fs.unlinkSync(outputFile)
        return callback(null)
			})
		}
32227
function deleteFn (req, res, next) {
    var reqPath = req.params[0];
    debug('deleteFn', 'reqPath', reqPath);

    rimraf(path.join(ramlPath, reqPath), function (err) {
      if (err) return next(err);
      res.sendStatus(200);
    });
  }
901088
def cleanup(sprocket_assets = [:javascripts, :stylesheets])
      # Remove previous dist path
      FileUtils.rm_r build_path if File.exists?(build_path)
      # Clean compass project
      Compass::Exec::SubCommandUI.new(["clean", project_root]).run!
      # Don't initialize Compass assets, the config will take care of it
      sprocket_assets.each do |asset|
        FileUtils.mkdir_p File.join(build_path, asset.to_s)
      end
      if mustaches_config_file_exists?
        mustaches_yaml.each_key do |dir|
          FileUtils.mkdir_p File.join(build_path, dir.to_s)
        end
      end
    end
524506
def delete(ctx, archive_name):
    '''
    
    '''

    _generate_api(ctx)
    var = ctx.obj.api.get_archive(archive_name)

    var.delete()
    click.echo('deleted archive {}'.format(var))
933888
def delete(index_name, force, verbose):
    """"""
    result = current_search_client.indices.delete(
        index=index_name,
        ignore=[400, 404] if force else None,
    )
    if verbose:
        click.echo(json.dumps(result))
177475
function deleteFile(req, res) {
		var rest = req.params["0"];
		var file = fileUtil.getFile(req, rest);
		fileUtil.withStatsAndETag(file.path, function(error, stats, etag) {
			var callback = function(error) {
				if (error) {
					return writeError(500, res, error);
				}
				sendStatus(204, res);
			};
			var ifMatchHeader = req.headers['if-match'];
			if (error && error.code === 'ENOENT') {
				return sendStatus(204, res);
			} else if (error) {
				writeError(500, res, error);
			} else if (ifMatchHeader && ifMatchHeader !== etag) {
				return sendStatus(412, res);
			} else if (stats.isDirectory()) {
				fileUtil.rumRuff(file.path, callback);
			} else {
				fs.unlink(file.path, callback);
			}
		});
	}