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

Parameters

name const(char)*

name of file to update

data const(void)*

updated contents of file

Return Value

Type: bool

true on success

Suggestion Box / Bug Report