xref: /php-uv/examples/fs_truncate.php (revision 99312394)
1<?php
2
3uv_fs_open(uv_default_loop(),"./tmp", UV::O_WRONLY,
4    UV::S_IRWXU | UV::S_IRUSR,
5    function($fd) {
6        var_dump($fd);
7        uv_fs_ftruncate(uv_default_loop(), $fd, 0, function($fd) {
8             uv_fs_close(uv_default_loop(), $fd, function(){});
9        });
10});
11
12uv_run();
13