MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / overQuota

Function overQuota

lib/utils.mjs:273–281  ·  view source on GitHub ↗
(root, serverUri)

Source from the content-addressed store, hash-verified

271 * could PUT a large file and get away with it.
272 */
273export async function overQuota (root, serverUri) {
274 const quota = await getQuota(root, serverUri)
275 if (quota === Infinity) {
276 return false
277 }
278 // TODO: cache this value?
279 const size = await actualSize(root)
280 return (size > quota)
281}
282
283/**
284 * Returns the number of bytes that is occupied by the actual files in

Callers 5

putMethod · 0.90
copyMethod · 0.90
patchMethod · 0.90
doWriteFunction · 0.90
quota-test.mjsFile · 0.90

Calls 2

getQuotaFunction · 0.85
actualSizeFunction · 0.85

Tested by

no test coverage detected