| 132 | } |
| 133 | |
| 134 | ACTOR static Future<Void> zeroRange(AsyncFileEncrypted* self, int64_t offset, int64_t length) { |
| 135 | ASSERT(self->mode == AsyncFileEncrypted::Mode::APPEND_ONLY); |
| 136 | // TODO: Could optimize this |
| 137 | Arena arena; |
| 138 | auto zeroes = new (arena) unsigned char[length]; |
| 139 | memset(zeroes, 0, length); |
| 140 | wait(uncancellable(holdWhile(arena, self->write(zeroes, length, offset)))); |
| 141 | return Void(); |
| 142 | } |
| 143 | }; |
| 144 | |
| 145 | AsyncFileEncrypted::AsyncFileEncrypted(Reference<IAsyncFile> file, Mode mode) |
nothing calls this directly
no test coverage detected