… | |
… | |
789 | |
789 | |
790 | =over 4 |
790 | =over 4 |
791 | |
791 | |
792 | =item IO::AIO::READDIR_DENTS |
792 | =item IO::AIO::READDIR_DENTS |
793 | |
793 | |
794 | When this flag is off, then the callback gets an arrayref consisting of |
794 | Normally the callback gets an arrayref consisting of names only (as |
795 | names only (as with C<aio_readdir>), otherwise it gets an arrayref with |
795 | with C<aio_readdir>). If this flag is set, then the callback gets an |
796 | C<[$name, $type, $inode]> arrayrefs, each describing a single directory |
796 | arrayref with C<[$name, $type, $inode]> arrayrefs, each describing a |
797 | entry in more detail. |
797 | single directory entry in more detail: |
798 | |
798 | |
799 | C<$name> is the name of the entry. |
799 | C<$name> is the name of the entry. |
800 | |
800 | |
801 | C<$type> is one of the C<IO::AIO::DT_xxx> constants: |
801 | C<$type> is one of the C<IO::AIO::DT_xxx> constants: |
802 | |
802 | |
803 | C<IO::AIO::DT_UNKNOWN>, C<IO::AIO::DT_FIFO>, C<IO::AIO::DT_CHR>, C<IO::AIO::DT_DIR>, |
803 | C<IO::AIO::DT_UNKNOWN>, C<IO::AIO::DT_FIFO>, C<IO::AIO::DT_CHR>, C<IO::AIO::DT_DIR>, |
804 | C<IO::AIO::DT_BLK>, C<IO::AIO::DT_REG>, C<IO::AIO::DT_LNK>, C<IO::AIO::DT_SOCK>, |
804 | C<IO::AIO::DT_BLK>, C<IO::AIO::DT_REG>, C<IO::AIO::DT_LNK>, C<IO::AIO::DT_SOCK>, |
805 | C<IO::AIO::DT_WHT>. |
805 | C<IO::AIO::DT_WHT>. |
806 | |
806 | |
807 | C<IO::AIO::DT_UNKNOWN> means just that: readdir does not know. If you need to |
807 | C<IO::AIO::DT_UNKNOWN> means just that: readdir does not know. If you need |
808 | know, you have to run stat yourself. Also, for speed reasons, the C<$type> |
808 | to know, you have to run stat yourself. Also, for speed/memory reasons, |
809 | scalars are read-only: you can not modify them. |
809 | the C<$type> scalars are read-only: you must not modify them. |
810 | |
810 | |
811 | C<$inode> is the inode number (which might not be exact on systems with 64 |
811 | C<$inode> is the inode number (which might not be exact on systems with 64 |
812 | bit inode numbers and 32 bit perls). This field has unspecified content on |
812 | bit inode numbers and 32 bit perls). This field has unspecified content on |
813 | systems that do not deliver the inode information. |
813 | systems that do not deliver the inode information. |
814 | |
814 | |
… | |
… | |
825 | short names are tried first. |
825 | short names are tried first. |
826 | |
826 | |
827 | =item IO::AIO::READDIR_STAT_ORDER |
827 | =item IO::AIO::READDIR_STAT_ORDER |
828 | |
828 | |
829 | When this flag is set, then the names will be returned in an order |
829 | When this flag is set, then the names will be returned in an order |
830 | suitable for stat()'ing each one. That is, when you plan to stat() |
830 | suitable for stat()'ing each one. That is, when you plan to stat() most or |
831 | all files in the given directory, then the returned order will likely |
831 | all files in the given directory, then the returned order will likely be |
832 | be fastest. |
832 | faster. |
833 | |
833 | |
834 | If both this flag and C<IO::AIO::READDIR_DIRS_FIRST> are specified, then |
834 | If both this flag and C<IO::AIO::READDIR_DIRS_FIRST> are specified, |
835 | the likely dirs come first, resulting in a less optimal stat order. |
835 | then the likely dirs come first, resulting in a less optimal stat order |
|
|
836 | for stat'ing all entries, but likely a more optimal order for finding |
|
|
837 | subdirectories. |
836 | |
838 | |
837 | =item IO::AIO::READDIR_FOUND_UNKNOWN |
839 | =item IO::AIO::READDIR_FOUND_UNKNOWN |
838 | |
840 | |
839 | This flag should not be set when calling C<aio_readdirx>. Instead, it |
841 | This flag should not be set when calling C<aio_readdirx>. Instead, it |
840 | is being set by C<aio_readdirx>, when any of the C<$type>'s found were |
842 | is being set by C<aio_readdirx>, when any of the C<$type>'s found were |