updateIfChanged

Writes given the content to the given file.

The content will only be written to the file specified in path if that file doesn't exist, or the content of the existing file is different from the given content.

This makes sure the timestamp of the file is only updated when the content has changed. This will avoid rebuilding when the content hasn't changed.

void
updateIfChanged
(
const string path
,
const string content
)

Parameters

path string

the path to the file to write the content to

content string

the content to write to the file

Meta