Skip to content

src/diff/lib

Module summary

Module src/diff/lib

Exports

NameKindDefault
atomicWriteJsonfunctionno

Detail

atomicWriteJson

async atomicWriteJson(target, value, jsonSpace): Promise<void>

Atomic JSON writer shared by wiki-generator diff trackers. Writes the serialized value to a temp file in the SAME directory as the target, fsyncs it, then renames into place. Cross-device, permissions, or ENOSPC errors during rename leave the tmp file cleaned up.

tmp filename format: tmp-<basename(target)>---.

Params

  • target
  • value
  • jsonSpace = 2

Returns

Promise<void>

Examples

None.