Function createWritable

    • Creates a writable output stream to a file transparently handling optional gzip compression.

      Parameters

      • options: { compress?: boolean; filepath: string }

        Options.

        • Optionalcompress?: boolean

          When true, gzip compression is enabled; default: false

        • filepath: string

          Output file path.

      Returns Writable

      A writable stream with optional gzip compression.

      If the filepath is already an existing directory.