Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\File\stat.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>File::stat - by-name interface to Perl's built-in stat functions</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> File::stat - by-name interface to Perl's built-in stat functions</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#bugs">BUGS</a></li> <li><a href="#note">NOTE</a></li> <li><a href="#author">AUTHOR</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <h1><a name="name">NAME</a></h1> <p>File::stat - by-name interface to Perl's built-in <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#stat"><code>stat()</code></a> functions</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use File::stat; $st = stat($file) or die "No $file: $!"; if ( ($st->mode & 0111) && $st->nlink > 1) ) { print "$file is executable with lotsa links\n"; }</pre> <pre> use File::stat qw(:FIELDS); stat($file) or die "No $file: $!"; if ( ($st_mode & 0111) && $st_nlink > 1) ) { print "$file is executable with lotsa links\n"; }</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>This module's default exports override the core <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#stat"><code>stat()</code></a> and <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#lstat"><code>lstat()</code></a> functions, replacing them with versions that return "File::stat" objects. This object has methods that return the similarly named structure field name from the <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#stat"><code>stat(2)</code></a> function; namely, dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks.</p> <p>You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#stat"><code>stat()</code></a> and <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#lstat"><code>lstat()</code></a> functions.) Access these fields as variables named with a preceding <code>st_</code> in front their method names. Thus, <code>$stat_obj->dev()</code> corresponds to $st_dev if you import the fields.</p> <p>To access this functionality without the core overrides, pass the <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#use"><code>use</code></a> an empty import list, and then access function functions with their full qualified names. On the other hand, the built-ins are still available via the <code>CORE::</code> pseudo-package.</p> <p> </p> <hr /> <h1><a name="bugs">BUGS</a></h1> <p>As of Perl 5.8.0 after using this module you cannot use the implicit <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html#__"><code>$_</code></a> or the special filehandle <code>_</code> with <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#stat"><code>stat()</code></a> or <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlfunc.html#lstat"><code>lstat()</code></a>, trying to do so leads into strange errors. The workaround is for <a href="file://C|\ADE\aime_smenon_perl_090715\perl\html/pod/perlvar.html#__"><code>$_</code></a> to be explicit</p> <pre> my $stat_obj = stat $_;</pre> <p>and for <code>_</code> to explicitly populate the object using the unexported and undocumented <code>populate()</code> function with CORE::stat():</p> <pre> my $stat_obj = File::stat::populate(CORE::stat(_));</pre> <p> </p> <hr /> <h1><a name="note">NOTE</a></h1> <p>While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.</p> <p> </p> <hr /> <h1><a name="author">AUTHOR</a></h1> <p>Tom Christiansen</p> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> File::stat - by-name interface to Perl's built-in stat functions</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de