storeDiskFile | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...
    • Store a file to disk (atomically if possible)

      Does not replace an existing file unless explicitly specified with overwrite: true. If overwrite is set, inplace is not set, and the filename length is shorter than 230 bytes, a temporary file will be created and moved over the original to ensure an atomic replace

      Parameters

      • path: string

        Path to the file to create.

      • data:
            | string
            | Blob
            | Buffer<ArrayBufferLike>
            | Stream
            | ReadableStream<Uint8Array<ArrayBufferLike>>

        Blob to write

      • Optionaloptions: StoreDiskFileOptions

      Returns Promise<{ skipped: boolean }>

      { skipped: true } if onlyIfChanged was set and the file was already up-to-date