Function storeDiskFile
- storeDiskFile(
path: string,
data:
| string
| Blob
| Buffer<ArrayBufferLike>
| Stream
| ReadableStream<Uint8Array<ArrayBufferLike>>,
options?: StoreDiskFileOptions,
): Promise<{ skipped: boolean }>Parameters
- path: string
Path to the file to create.
- data:
| string
| Blob
| Buffer<ArrayBufferLike>
| Stream
| ReadableStream<Uint8Array<ArrayBufferLike>>Blob to write
Optional
options: StoreDiskFileOptions
Returns Promise<{ skipped: boolean }>
{ skipped: true } if onlyIfChanged was set and the file was already up-to-date
- path: string
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