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

Parameters

data void[]

updated contents of file

Return Value

Type: bool

true on success

Suggestion Box / Bug Report