diff options
author | B. Watson <yalhcru@gmail.com> | 2022-03-14 04:05:59 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-03-14 04:05:59 -0400 |
commit | 519e0ec2156a77987d3be3f925e3abc30c082dfe (patch) | |
tree | 7abe1c4c6f7f0cc355938dd61d846721ab379080 /perl | |
parent | 9cf576eb6afa0d22d74fbac03fbf97d04b6d6f83 (diff) | |
download | slackbuilds-519e0ec2156a77987d3be3f925e3abc30c082dfe.tar.gz |
perl/perl-file-listing: Wrap README at 72 columns.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'perl')
-rw-r--r-- | perl/perl-file-listing/README | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/perl/perl-file-listing/README b/perl/perl-file-listing/README index a76cfefbaa..39d1843588 100644 --- a/perl/perl-file-listing/README +++ b/perl/perl-file-listing/README @@ -1,23 +1,31 @@ -This module exports a single function called parse_dir(), which can -be used to parse directory listings. +This module exports a single function called parse_dir(), which can be +used to parse directory listings. + The first parameter to parse_dir() is the directory listing to parse. It can be a scalar, a reference to an array of directory lines or a glob representing a filehandle to read the directory listing from. + The second parameter is the time zone to use when parsing time stamps in the listing. If this value is undefined, then the local time zone is assumed. + The third parameter is the type of listing to assume. Currently supported formats are 'unix', 'apache' and 'dosftp'. The default value 'unix'. Ideally, the listing type should be determined automatically. -The fourth parameter specifies how unparseable lines should be treated. -Values can be 'ignore', 'warn' or a code reference. Warn means that the -perl warn() function will be called. If a code reference is passed, then -this routine will be called and the return value from it will be incorporated -in the listing. The default is 'ignore'. + +The fourth parameter specifies how unparseable lines should be +treated. Values can be 'ignore', 'warn' or a code reference. Warn +means that the perl warn() function will be called. If a code +reference is passed, then this routine will be called and the return +value from it will be incorporated in the listing. The default is +'ignore'. + Only the first parameter is mandatory. -The return value from parse_dir() is a list of directory entries. In a scalar -context the return value is a reference to the list. The directory entries -are represented by an array consisting of [ $filename, $filetype, $filesize, -$filetime, $filemode ]. The $filetype value is one of the letters 'f', 'd', -'l' or '?'. The $filetime value is the seconds since Jan 1, 1970. The -$filemode is a bitmask like the mode returned by stat(). + +The return value from parse_dir() is a list of directory entries. In +a scalar context the return value is a reference to the list. The +directory entries are represented by an array consisting of [ +$filename, $filetype, $filesize, $filetime, $filemode ]. The $filetype +value is one of the letters 'f', 'd', 'l' or '?'. The $filetime value +is the seconds since Jan 1, 1970. The $filemode is a bitmask like the +mode returned by stat(). |