Select an installed module below |
NAMEIO::Dir - supply object methods for directory handles
SYNOPSIS
use IO::Dir;
$d = new IO::Dir ".";
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 The first interface is an object approach.
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.
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
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 ALSO
AUTHORGraham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perl5-porters@perl.org>.
COPYRIGHTCopyright (c) 1997-8 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.
|
|