#!/usr/bin/perl -w
use strict;

my($help) = <<'__help__';

============================================================================

listdir VERSION 1.05
   list a local or remote directory in different plaintext formats

   OPTIONS

      --files-only   * does not show directory items within the specified
                       directory.  Only lists files.

      --dirs-only    * does not show file items within the specified
                       directory.  Only lists directories.

      --no-fancy     * files listed in a single column without any other
                       formatting. (useful for quick copy to the clipboard).

      --recurse      * both of these options mean the same thing.  It instructs
      --follow         listdir to recursively list a directory and its contents

      --maxdepth [?] * (follow this option with an integer: --maxdepth 20)
                       maximum number of recursive directory listings.  Default
                       is 500.  This only applies when using the '--recurse' or
                       the '--follow' options.

      --quiet        * no warnings output to the console.  warnings are
                       on by default

      --help         * show this message.

      --version      * show version of this listdir installation

   NOTE
      Multiple options may be passed to listdir as desired.

   USAGE:
      listdir [directory path] [options]

   EXAMPLES
      listdir /etc/ --follow --dirs-only --maxdepth 10
      listdir /usr/home/projects/  --files-only
      listdir --help
      listdir . --files-only --no-fancy

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__help__


my($version) = <<'__ver__';

============================================================================
listdir VERSION:  1.00
         RELEASED: 8/13/2002, 12:11:57 AM
         AUTHOR:   Tommy Butler <shell.scripts@atrixnet.com>
         COPYING:  use and distribute under the GNU public liscence
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__ver__


use Time::HiRes qw( time ); use Futils qw( n );

my($f) = Futils->new(); print( $f->print_dir(@ARGV) );

print('took ' . sprintf('%.2f',((time-$^T))) . ' seconds' . n);

exit;

=pod

   AUTHOR
      Tommy Butler <tommy @ atrixnet.com>
      phone: (817)-468-7716
      6711 Forest Park Dr
      Arlington, TX
           76001-8403

   COPYRIGHT   Tommy Butler. All rights reserved
   LISCENCE    This software is free, use/distribute under the GNU GPL.
   BUGS TO     Tommy Butler <perlmod @ atrixnet.com>

   This code uses Futils, a Perl module (or reusable code library) to make life
   easier when doing things with files.  You can download the code at:
   <http://ooopps.sourceforge.net/cgi-bin/archive.pl/pub/modules/Futils.pm>

   Futils uses other modules, which may be also be found here at the
   ooOPps Open Source Code Library under the "modules" section.  Refer to the
   itemized list below for more specific information:

      "Handy::Dandy"
         used by:    Futils
         file name   Dandy.pm
         get it at: /pub/modules/Handy/Dandy.pm

      "OOorNo"
         used by:    Futils, Handy::Dandy
         file name:  OOorNo.pm
         get it at: /pub/modules/OOorNo.pm

      "Handy::Dandy::TimeTools"
         used by:    Handy::Dandy
         file name:  TimeTools.pm
         get it at: /pub/modules/Handy/Dandy/TimeTools.pm

=cut