MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / resizeBlocks

Function resizeBlocks

cmd/cql-fuse/block.go:351–358  ·  view source on GitHub ↗

resize changes the size of the data for the inode with id 'inodeID' from 'from' to 'to'. This may grow or shrink.

(e sqlExecutor, inodeID, from, to uint64)

Source from the content-addressed store, hash-verified

349// resize changes the size of the data for the inode with id 'inodeID'
350// from 'from' to 'to'. This may grow or shrink.
351func resizeBlocks(e sqlExecutor, inodeID, from, to uint64) error {
352 if to < from {
353 return shrink(e, inodeID, from, to)
354 } else if to > from {
355 return grow(e, inodeID, from, to)
356 }
357 return nil
358}

Callers 1

SetattrMethod · 0.85

Calls 2

shrinkFunction · 0.85
growFunction · 0.85

Tested by

no test coverage detected