File.update

Update file

If the file exists and is identical to what is to be written, merely update the timestamp on the file. Otherwise, write the file.

The idea is writes are much slower than reads, and build systems often wind up generating identical files.

  1. bool update(const(char)* namez, void[] data)
    struct File
    nothrow static
    bool
    update
    (
    const(char)* namez
    ,
    const void[] data
    )
  2. bool update(const(char)[] name, void[] data)

Parameters

data void[]

updated contents of file

Return Value

Type: bool

true on success

Meta