… | |
… | |
634 | as those tend to return 0 or 1 as link counts, which disables the |
634 | as those tend to return 0 or 1 as link counts, which disables the |
635 | directory counting heuristic. |
635 | directory counting heuristic. |
636 | |
636 | |
637 | =cut |
637 | =cut |
638 | |
638 | |
639 | sub aio_scandir($$$) { |
639 | sub aio_scandir($$;$) { |
640 | aio_block { |
640 | aio_block { |
641 | my ($path, $maxreq, $cb) = @_; |
641 | my ($path, $maxreq, $cb) = @_; |
642 | |
642 | |
643 | my $pri = aioreq_pri; |
643 | my $pri = aioreq_pri; |
644 | |
644 | |
… | |
… | |
724 | } |
724 | } |
725 | } |
725 | } |
726 | |
726 | |
727 | =item aio_rmtree $path, $callback->($status) |
727 | =item aio_rmtree $path, $callback->($status) |
728 | |
728 | |
729 | Delete a directory tree starting (and including) C<$path>, return the status of the final C<rmdir> only. |
729 | Delete a directory tree starting (and including) C<$path>, return the |
|
|
730 | status of the final C<rmdir> only. This is a composite request that |
730 | This is a composite request that uses C<aio_scandir> to recurse into and rmdir directories, and |
731 | uses C<aio_scandir> to recurse into and rmdir directories, and unlink |
731 | unlink everything else. |
732 | everything else. |
732 | |
733 | |
733 | =cut |
734 | =cut |
734 | |
735 | |
735 | sub aio_rmtree; |
736 | sub aio_rmtree; |
736 | sub aio_rmtree { |
737 | sub aio_rmtree($;$) { |
737 | aio_block { |
738 | aio_block { |
738 | my ($path, $cb) = @_; |
739 | my ($path, $cb) = @_; |
739 | |
740 | |
740 | my $pri = aioreq_pri; |
741 | my $pri = aioreq_pri; |
741 | my $grp = aio_group $cb; |
742 | my $grp = aio_group $cb; |