summaryrefslogtreecommitdiffstats
path: root/perl/perl-file-listing/README
diff options
context:
space:
mode:
author LukenShiro2011-12-14 21:21:31 +0100
committer Niels Horn2011-12-18 03:07:50 +0100
commit730402d64b6ccb8bf31b6b96a9348cff574cf301 (patch)
treef3bb081e7fe51c598407481d6dfc5f097d64520c /perl/perl-file-listing/README
parent32df864ea41e729974b83a4debf8de95be6cc861 (diff)
downloadslackbuilds-730402d64b6ccb8bf31b6b96a9348cff574cf301.tar.gz
perl/perl-file-listing: Added (parse directory listing)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'perl/perl-file-listing/README')
-rw-r--r--perl/perl-file-listing/README25
1 files changed, 25 insertions, 0 deletions
diff --git a/perl/perl-file-listing/README b/perl/perl-file-listing/README
new file mode 100644
index 0000000000..9d2fc2392a
--- /dev/null
+++ b/perl/perl-file-listing/README
@@ -0,0 +1,25 @@
+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'.
+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().
+
+This requires perl-http-date.