EU Parliament Monitor — API Documentation - v0.9.8
    Preparing search index...

    Function writeFileIfChanged

    • Write content to filepath only if the existing on-disk bytes differ.

      Used to keep aws s3 sync (which compares size + mtime) from re-uploading files whose content the build pipeline regenerated identically — see the idempotency contract documented in .github/workflows/deploy-s3.yml.

      Parameters

      • filepath: string

        Output file path

      • content: string | Buffer<ArrayBufferLike>

        Desired file content (UTF-8 string or raw Buffer)

      Returns boolean

      true when an actual write occurred, false when the file already had byte-identical content and was left untouched.