Skip to content

Minima.js API


Minima.js API / @minimajs/disk / helpers

helpers

Functions

FunctionDescription
async2stream-
createDiskFile-
ensureMetadataSymbolsCopies symbol-keyed entries from src into dest. Used to propagate plugin-private state through the put pipeline without requiring drivers to preserve symbol keys.
fileFromMetadata-
getDiskRetrieve the originating Disk from any File (undefined if not set)
getMimeTypeDetect MIME type from file path/key using the mime-types library
isArrayBuffer-
isArrayBufferView-
isBlob-
isDiskFile-
isFile-
randomName-
resolveContentTypeResolve content type from options or data Uses FilePropertyBag's 'type' property (web-native)
resolveKeyResolve a path/key from a FileSource. - DiskFile.href (storage identifier) - File.name - string → returned as-is
setDiskAttach a Disk reference to a file — called internally by StandardDisk
stream2bytes-
text2stream-
toReadableStreamConvert any DiskData type to a ReadableStream