File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,12 @@ Deletes all the blobs from storage to free up space, similar to how `drive.clear
194
194
}
195
195
```
196
196
197
+ #### ` await drive.truncate(version, [options] }) `
198
+
199
+ Truncates the Hyperdrive to a previous version (both the file-structure reference and the blobs).
200
+
201
+ A ` blobs: <length> ` option can be passed in if you know the corresponding blobs length, but it is recommended to let the method figure it out for you.
202
+
197
203
#### ` await drive.purge() `
198
204
199
205
Purge both cores (db and blobs) from your storage, completely removing all the drive's data.
@@ -376,6 +382,10 @@ const buffer2 = await blobs.get(entry.value.blob)
376
382
[ core-range-docs ] : https://github.com/holepunchto/hypercore#const-range--coredownloadrange
377
383
[ store-replicate-docs ] : https://github.com/holepunchto/corestore#const-stream--storereplicateoptsorstream
378
384
385
+ #### ` const blobsLength = await drive.getBlobsLength(checkout) `
386
+
387
+ Returns the length of the Hyperblobs instance at the time of the specified Hyperdrive version (defaults to the current version).
388
+
379
389
## License
380
390
381
391
Apache-2.0
You can’t perform that action at this time.
0 commit comments