sdk.file_2.sdkfile.slice
Home > @matterway/sdk > File_2 > SdkFile > slice
File_2.SdkFile.slice() method
Returns a new File with only data in the given range of bytes.
Signature:
slice(start?: number, end?: number, type?: string): SdkFile;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | (Optional) The start index of the byte range. |
end | number | (Optional) The end index of the byte range. |
type | string | (Optional) The type of the sliced file. Default is an empty string. |
Returns:
A new File object with the sliced data.