… | |
… | |
168 | use common::sense; |
168 | use common::sense; |
169 | |
169 | |
170 | use base 'Exporter'; |
170 | use base 'Exporter'; |
171 | |
171 | |
172 | BEGIN { |
172 | BEGIN { |
173 | our $VERSION = '3.8'; |
173 | our $VERSION = '3.9'; |
174 | |
174 | |
175 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close |
175 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close |
176 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx |
176 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx |
177 | aio_scandir aio_symlink aio_readlink aio_sync aio_fsync |
177 | aio_scandir aio_symlink aio_readlink aio_sync aio_fsync |
178 | aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead |
178 | aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead |
… | |
… | |
368 | } else { |
368 | } else { |
369 | die "open failed: $!\n"; |
369 | die "open failed: $!\n"; |
370 | } |
370 | } |
371 | }; |
371 | }; |
372 | |
372 | |
|
|
373 | In addition to all the common open modes/flags (C<O_RDONLY>, C<O_WRONLY>, |
|
|
374 | C<O_RDWR>, C<O_CREAT>, C<O_TRUNC>, C<O_EXCL> and C<O_APPEND>), the |
|
|
375 | following POSIX and non-POSIX constants are available (missing ones on |
|
|
376 | your system are, as usual, C<0>): |
|
|
377 | |
|
|
378 | C<O_ASYNC>, C<O_DIRECT>, C<O_NOATIME>, C<O_CLOEXEC>, C<O_NOCTTY>, C<O_NOFOLLOW>, |
|
|
379 | C<O_NONBLOCK>, C<O_EXEC>, C<O_SEARCH>, C<O_DIRECTORY>, C<O_DSYNC>, |
|
|
380 | C<O_RSYNC>, C<O_SYNC> and C<O_TTY_INIT>. |
|
|
381 | |
373 | |
382 | |
374 | =item aio_close $fh, $callback->($status) |
383 | =item aio_close $fh, $callback->($status) |
375 | |
384 | |
376 | Asynchronously close a file and call the callback with the result |
385 | Asynchronously close a file and call the callback with the result |
377 | code. |
386 | code. |