ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.283 by root, Tue Feb 20 06:05:19 2018 UTC vs.
Revision 1.284 by root, Fri Mar 23 01:14:08 2018 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines