(req)
| 168 | async release({fh}) { Cache.removeObjectForHandle(fh); return {}; }, |
| 169 | |
| 170 | async truncate(req) { |
| 171 | let arr = toUtf8Array(await getData(req)); |
| 172 | if (req.size !== arr.length) { |
| 173 | const newArr = new Uint8Array(req.size); |
| 174 | newArr.set(arr.slice(0, Math.min(req.size, arr.length))); |
| 175 | arr = newArr; |
| 176 | } |
| 177 | Cache.setObjectForPath(req.path, arr); |
| 178 | await setData(req, utf8ArrayToString(arr)); return {}; |
| 179 | } |
| 180 | }); |
| 181 | makeRouteWithContents.Cache = Cache; |
| 182 | return makeRouteWithContents; |
nothing calls this directly
no test coverage detected