home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / Finfo.pm < prev    next >
Encoding:
Perl POD Document  |  2004-09-23  |  8.2 KB  |  527 lines

  1. # /*
  2. #  * *********** WARNING **************
  3. #  * This file generated by ModPerl::WrapXS/0.01
  4. #  * Any changes made here will be lost
  5. #  * ***********************************
  6. #  * 01: lib/ModPerl/Code.pm:701
  7. #  * 02: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:584
  8. #  * 03: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:1100
  9. #  * 04: Makefile.PL:335
  10. #  * 05: Makefile.PL:283
  11. #  * 06: Makefile.PL:51
  12. #  */
  13.  
  14.  
  15. package APR::Finfo;
  16.  
  17. use strict;
  18. use warnings FATAL => 'all';
  19.  
  20.  
  21. use APR ();
  22. use APR::XSLoader ();
  23. our $VERSION = '0.01';
  24. APR::XSLoader::load __PACKAGE__;
  25.  
  26.  
  27.  
  28. 1;
  29. __END__
  30.  
  31. =head1 NAME
  32.  
  33. APR::Finfo - Perl API for APR fileinfo structure
  34.  
  35. XXX: Besides working through the doc we need to get good constant
  36. names from libapr (needs apr patching)
  37.  
  38.  
  39. =head1 Synopsis
  40.  
  41.   use APR::Finfo ();
  42.  
  43. META: to be completed
  44.  
  45.  
  46.  
  47.  
  48. =head1 Description
  49.  
  50. APR fileinfo structure provides somewhat similar information to Perl's
  51. C<stat()> call, but you will want to use this module's API to query an
  52. already C<stat()'ed> filehandle to avoid an extra system call or to
  53. query attributes specific to APR file handles.
  54.  
  55. During the HTTP request handlers coming after
  56. C<L<PerlMapToStorageHandler|docs::2.0::user::handlers::http/PerlMapToStorageHandler>>,
  57. C<L<$r-E<gt>finfo|docs::2.0::api::Apache::RequestRec/C_finfo_>>
  58. already contains the cached values from the apr's C<stat()> call. So
  59. you don't want to perform it again, but instead get the C<ARP::Finfo>
  60. object via:
  61.  
  62.   my $finfo = $r->finfo;
  63.  
  64.  
  65.  
  66. =head1 API
  67.  
  68. C<APR::Finfo> provides the following functions and/or methods:
  69.  
  70.  
  71.  
  72.  
  73. =head2 C<stat>
  74.  
  75. Get the specified file's stats.  The file is specified by filename,
  76. instead of using a pre-opened file.
  77.  
  78.   $finfo = stat($fname, $wanted_fields, $pool);
  79.  
  80. =over 4
  81.  
  82. =item arg1: C<$fname> ( string )
  83.  
  84. The path to the file to C<stat()>.
  85.  
  86. =item arg2: C<$wanted> ( string )
  87.  
  88. The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
  89.  
  90. XXX
  91.  
  92. =item arg3: C<$pool> ( integer )
  93.  
  94. the pool to use to allocate the new file.
  95.  
  96. =item ret: C<$finfo>
  97. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  98.  
  99. =item since: 1.99_12
  100.  
  101. =back
  102.  
  103.  
  104.  
  105.  
  106.  
  107. =head2 C<pool>
  108.  
  109. META: Autogenerated - needs to be reviewed/completed
  110.  
  111. Allocates memory and closes lingering handles in the specified pool
  112.  
  113.   $ret = $obj->pool($newval);
  114.  
  115. =over 4
  116.  
  117. =item obj: C<$obj>
  118. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  119.  
  120. =item arg1: C<$newval>
  121. ( C<L<APR::Pool|docs::2.0::api::APR::Pool>> )
  122.  
  123. =item since: 1.99_12
  124.  
  125. =back
  126.  
  127.  
  128.  
  129.  
  130.  
  131. =head2 C<valid>
  132.  
  133. META: Autogenerated - needs to be reviewed/completed
  134.  
  135. The bitmask describing valid fields of this apr_finfo_t structure
  136. including all available 'wanted' fields and potentially more
  137.  
  138.   $ret = $obj->valid($newval);
  139.  
  140. =over 4
  141.  
  142. =item obj: C<$obj>
  143. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  144.  
  145. =item arg1: C<$newval> ( integer )
  146.  
  147. =item since: 1.99_12
  148.  
  149. =back
  150.  
  151.  
  152.  
  153.  
  154.  
  155. =head2 C<protection>
  156.  
  157. META: Autogenerated - needs to be reviewed/completed
  158.  
  159. The access permissions of the file.  Mimics Unix access rights.
  160.  
  161.   $ret = $obj->protection($newval);
  162.  
  163. =over 4
  164.  
  165. =item obj: C<$obj>
  166. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  167.  
  168. =item arg1: C<$newval> ( integer )
  169.  
  170. =item since: 1.99_12
  171.  
  172. =back
  173.  
  174.  
  175.  
  176.  
  177.  
  178. =head2 C<filetype>
  179.  
  180. META: Autogenerated - needs to be reviewed/completed
  181.  
  182. The type of file.  One of APR_REG, APR_DIR, APR_CHR, APR_BLK, APR_PIPE,
  183. APR_LNK or APR_SOCK.  If the type is undetermined, the value is APR_NOFILE.
  184. If the type cannot be determined, the value is APR_UNKFILE.
  185.  
  186.   $ret = $obj->filetype($newval);
  187.  
  188. =over 4
  189.  
  190. =item obj: C<$obj>
  191. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  192.  
  193. =item arg1: C<$newval> ( integer )
  194.  
  195. =item since: 1.99_12
  196.  
  197. =back
  198.  
  199.  
  200.  
  201.  
  202.  
  203. =head2 C<user>
  204.  
  205. META: Autogenerated - needs to be reviewed/completed
  206.  
  207. The user id that owns the file
  208.  
  209.   $ret = $obj->user($newval);
  210.  
  211. Note that this method may not be meaningful on all platforms,
  212. most notably Win32.
  213.  
  214. =over 4
  215.  
  216. =item obj: C<$obj>
  217. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  218.  
  219. =item arg1: C<$newval> ( integer )
  220.  
  221. =item since: 1.99_12
  222.  
  223. =back
  224.  
  225.  
  226.  
  227.  
  228.  
  229. =head2 C<group>
  230.  
  231. META: Autogenerated - needs to be reviewed/completed
  232.  
  233. The group id that owns the file
  234.  
  235.   $ret = $obj->group($newval);
  236.  
  237. Note that this method may not be meaningful on all platforms,
  238. most notably Win32.  Incorrect results have also been reported
  239. on some versions of OSX.
  240.  
  241. =over 4
  242.  
  243. =item obj: C<$obj>
  244. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  245.  
  246. =item arg1: C<$newval> ( integer )
  247.  
  248. =item since: 1.99_12
  249.  
  250. =back
  251.  
  252.  
  253.  
  254.  
  255.  
  256. =head2 C<inode>
  257.  
  258. META: Autogenerated - needs to be reviewed/completed
  259.  
  260. The inode of the file.
  261.  
  262.   $ret = $obj->inode($newval);
  263.  
  264. Note that this method may not be meaningful on all platforms,
  265. most notably Win32.
  266.  
  267. =over 4
  268.  
  269. =item obj: C<$obj>
  270. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  271.  
  272. =item arg1: C<$newval> ( integer )
  273.  
  274. =item since: 1.99_12
  275.  
  276. =back
  277.  
  278.  
  279.  
  280.  
  281.  
  282. =head2 C<device>
  283.  
  284. META: Autogenerated - needs to be reviewed/completed
  285.  
  286. The id of the device the file is on.
  287.  
  288.   $ret = $obj->device($newval);
  289.  
  290. Note that this method may not be meaningful on all platforms,
  291. most notably Win32.
  292.  
  293. =over 4
  294.  
  295. =item obj: C<$obj>
  296. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  297.  
  298. =item arg1: C<$newval>
  299. (number)
  300.  
  301. =item since: 1.99_12
  302.  
  303. =back
  304.  
  305.  
  306.  
  307.  
  308.  
  309. =head2 C<nlink>
  310.  
  311. META: Autogenerated - needs to be reviewed/completed
  312.  
  313. The number of hard links to the file.
  314.  
  315.   $ret = $obj->nlink($newval);
  316.  
  317. =over 4
  318.  
  319. =item obj: C<$obj>
  320. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  321.  
  322. =item arg1: C<$newval> ( integer )
  323.  
  324. =item since: 1.99_12
  325.  
  326. =back
  327.  
  328.  
  329.  
  330.  
  331.  
  332. =head2 C<size>
  333.  
  334. META: Autogenerated - needs to be reviewed/completed
  335.  
  336. The size of the file
  337.  
  338.   $ret = $obj->size($newval);
  339.  
  340. =over 4
  341.  
  342. =item obj: C<$obj>
  343. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  344.  
  345. =item arg1: C<$newval> ( integer )
  346.  
  347. =item since: 1.99_12
  348.  
  349. =back
  350.  
  351.  
  352.  
  353.  
  354.  
  355. =head2 C<csize>
  356.  
  357. META: Autogenerated - needs to be reviewed/completed
  358.  
  359. The storage size consumed by the file
  360.  
  361.   $ret = $obj->csize($newval);
  362.  
  363. =over 4
  364.  
  365. =item obj: C<$obj>
  366. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  367.  
  368. =item arg1: C<$newval> ( integer )
  369.  
  370. =item since: 1.99_12
  371.  
  372. =back
  373.  
  374.  
  375.  
  376.  
  377.  
  378. =head2 C<atime>
  379.  
  380. META: Autogenerated - needs to be reviewed/completed
  381.  
  382. The time the file was last accessed
  383.  
  384.   $ret = $obj->atime($newval);
  385.  
  386. Note that this method may not be reliable on all platforms,
  387. most notably Win32 - FAT32 filesystems appear to work properly
  388. but NTFS filesystems do not.
  389.  
  390. =over 4
  391.  
  392. =item obj: C<$obj>
  393. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  394.  
  395. =item arg1: C<$newval>
  396. (number)
  397.  
  398. =item since: 1.99_12
  399.  
  400. =back
  401.  
  402.  
  403.  
  404.  
  405.  
  406. =head2 C<mtime>
  407.  
  408. META: Autogenerated - needs to be reviewed/completed
  409.  
  410. The time the file was last modified
  411.  
  412.   $ret = $obj->mtime($newval);
  413.  
  414. =over 4
  415.  
  416. =item obj: C<$obj>
  417. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  418.  
  419. =item arg1: C<$newval>
  420. (number)
  421.  
  422. =item since: 1.99_12
  423.  
  424. =back
  425.  
  426.  
  427.  
  428.  
  429.  
  430. =head2 C<ctime>
  431.  
  432. META: Autogenerated - needs to be reviewed/completed
  433.  
  434. The time the file was last changed
  435.  
  436.   $ret = $obj->ctime($newval);
  437.  
  438. =over 4
  439.  
  440. =item obj: C<$obj>
  441. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  442.  
  443. =item arg1: C<$newval>
  444. (number)
  445.  
  446. =item since: 1.99_12
  447.  
  448. =back
  449.  
  450.  
  451.  
  452.  
  453.  
  454. =head2 C<fname>
  455.  
  456. META: Autogenerated - needs to be reviewed/completed
  457.  
  458. The pathname of the file (possibly unrooted)
  459.  
  460.   $ret = $obj->fname($newval);
  461.  
  462. =over 4
  463.  
  464. =item obj: C<$obj>
  465. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  466.  
  467. =item arg1: C<$newval>
  468. ( string )
  469.  
  470. =item since: 1.99_12
  471.  
  472. =back
  473.  
  474.  
  475.  
  476.  
  477.  
  478. =head2 C<name>
  479.  
  480. META: Autogenerated - needs to be reviewed/completed
  481.  
  482. The file's name (no path) in filesystem case
  483.  
  484.   $ret = $obj->name($newval);
  485.  
  486. =over 4
  487.  
  488. =item obj: C<$obj>
  489. ( C<L<APR::Finfo|docs::2.0::api::APR::Finfo>> )
  490.  
  491. =item arg1: C<$newval>
  492. ( string )
  493.  
  494. =item since: 1.99_12
  495.  
  496. =back
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503. =head1 See Also
  504.  
  505. L<mod_perl 2.0 documentation|docs::2.0::index>.
  506.  
  507.  
  508.  
  509.  
  510. =head1 Copyright
  511.  
  512. mod_perl 2.0 and its core modules are copyrighted under
  513. The Apache Software License, Version 2.0.
  514.  
  515.  
  516.  
  517.  
  518. =head1 Authors
  519.  
  520. L<The mod_perl development team and numerous
  521. contributors|about::contributors::people>.
  522.  
  523. =cut
  524.  
  525.