… | |
… | |
67 | use base 'Exporter'; |
67 | use base 'Exporter'; |
68 | |
68 | |
69 | use Fcntl (); |
69 | use Fcntl (); |
70 | |
70 | |
71 | BEGIN { |
71 | BEGIN { |
72 | $VERSION = '1.71'; |
72 | $VERSION = '1.72'; |
73 | |
73 | |
74 | @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
74 | @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
75 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
75 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
76 | aio_fsync aio_fdatasync aio_readahead); |
76 | aio_fsync aio_fdatasync aio_readahead); |
77 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel |
77 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel |
… | |
… | |
298 | |
298 | |
299 | $maxreq = 8 if $maxreq <= 0; |
299 | $maxreq = 8 if $maxreq <= 0; |
300 | |
300 | |
301 | # stat once |
301 | # stat once |
302 | aio_stat $path, sub { |
302 | aio_stat $path, sub { |
303 | $cb->() if $_[0]; |
303 | return $cb->() if $_[0]; |
304 | my $hash1 = join ":", (stat _)[0,1,3,7,9]; |
304 | my $hash1 = join ":", (stat _)[0,1,3,7,9]; |
305 | |
305 | |
306 | # read the directory entries |
306 | # read the directory entries |
307 | aio_readdir $path, sub { |
307 | aio_readdir $path, sub { |
308 | my $entries = shift |
308 | my $entries = shift |