IO::Dir - Online Linux Manual PageSection : 3pm
Updated : 2023-01-19
Source : perl v5.36.0
Note : Perl Programmers Reference Guide
NAMEIO::Dir − supply object methods for directory handles
SYNOPSIS use IO::Dir;
$d = IO::Dir−>new(".");
if (defined $d) {
while (defined($_ = $d−>read)) { something($_); }
$d−>rewind;
while (defined($_ = $d−>read)) { something_else($_); }
undef $d;
}
tie %dir, 'IO::Dir', ".";
foreach (keys %dir) {
print $_, " " , $dir{$_}−>size,"\n";
}
DESCRIPTIONThe IO::Dir package provides two interfaces to perl's directory reading routines. The first interface is an object approach. IO::Dir provides an object constructor and methods, which are just wrappers around perl's built in directory reading routines. new ( [ DIRNAME ] ) new is the constructor for IO::Dir objects. It accepts one optional argument which, if given, new will pass to open The following methods are wrappers for the directory related functions built into perl (the trailing 'dir' has been removed from the names). See perlfunc for details of these functions. open ( DIRNAME ) read () seek ( POS ) tell () rewind () close () IO::Dir also provides an interface to reading directories via a tied hash. The tied hash extends the interface beyond just the directory reading routines by the use of lstat, from the File::stat package, unlink, rmdir and utime. tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ] The keys of the hash will be the names of the entries in the directory. Reading a value from the hash will be the result of calling File::stat::lstat. Deleting an element from the hash will delete the corresponding file or subdirectory, provided that DIR_UNLINK is included in the OPTIONS. Assigning to an entry in the hash will cause the time stamps of the file to be modified. If the file does not exist then it will be created. Assigning a single integer to a hash element will cause both the access and modification times to be changed to that value. Alternatively a reference to an array of two values can be passed. The first array element will be used to set the access time and the second element will be used to set the modification time.
SEE ALSOFile::stat
AUTHORGraham Barr. Currently maintained by the Perl Porters. Please report all bugs at <https://github.com/Perl/perl5/issues>.
COPYRIGHTCopyright (c) 1997−2003 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 0
Johanes Gumabo
Data Size : 10,516 byte
man-IO::Dir.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 169,839
Visitor ID : :
Visitor IP : 3.139.70.69 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|IO::Dir.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|IO::Dir.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|IO::Dir.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|IO::Dir.3pm|43|'br══─}─══ |'br══─}─══
)