Skip to main content
Module

x/drake/mod.ts>updateFile

Drake is a make-like task runner for Deno.
Go to Latest
function updateFile
import { updateFile } from "https://deno.land/x/drake@v1.6.0/mod.ts";

Find and replace in text file synchronously. If the file contents is unchanged return false. If the contents has changed write it to the file and return true.

Parameters

filename: string
find: RegExp
replace: string

Returns

boolean