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)
  2. bool update(const(char)[] name, void[] data)
    struct File
    nothrow extern (D) static
    bool
    update
    (
    const(char)[] name
    ,
    const void[] data
    )
  3. bool update(const(char)* name, const(void)* data, size_t size)

Parameters

name const(char)[]

name of file to update

data void[]

updated contents of file

Return Value

Type: bool

true on success

Meta