ftruncate analogue
userqq opened this issue · comments
userqq commented
Hi.
Is there any plans to add ftruncate() analogue or any workaround?
Now I'm using something like that
yield \Amp\ParallelFunctions\parallel(function () use ($filename) {
$fh = fopen($filename, 'c');
ftruncate($fh, 1024);
fclose($fh);
})();
but I think it's terrible solution
Aaron Piotrowski commented
I'll add this function in the next release.
userqq commented
Great news.
Thank you
Aaron Piotrowski commented
This has been implemented in master and will be part of v1.0.