@database DirList.guide

@$VER: DirList_oo V3.00 - By Fabio Rotondo (C)Brighting Brain Brothers

This guide file has been created using AutoGuide V1.05 - By Fabio Rotondo (fsoft@intercom.it).

@node "Main" "Amiga Foundation Classes Module: DirList"



                  ** DirList_OO - Original By Fabio Rotondo **

                      * Part of Amiga Foundation Classes *

        @{" Introduction " link "DirList_introduction" }             @{" Author's Infos " link "author" }      @{" Amiga Foundation Classes " LINK "afc.guide/main"}


   Requires: @{" NodeMaster " LINK "NodeMaster.guide/main"}, @{" StringNode " LINK "StringNode.guide/main"}

   Base: $0003


   NOTE: DirList inherits completely @{" StringNode " LINK "stringnode.guide/main"} so, please, refer
         to this class for further documentation.

   NEW COMMANDS                          BRIEF DESCRIPTION
   -------------------------------------------------------------------------
   @{" DirList()                       " link "DirList_DirList" } Initailizes the object
   @{" dirname()                       " link "DirList_dirname" } Returns current dir name
   @{" read(dirs, files, match)        " link "DirList_read" } Scans a Directory
   @{" setattrs(tags)                  " link "DirList_setmode" } Set objects behaviours
   @{" setdir(path)                    " link "DirList_setdir" } Set Directory to read
   @{" version()                       " link "DirList_version"} Returns class version and revision

   @{" Tags Table                      " link "DirList_Tags" } Possible DirList's Tags

   @{" Errors Table                    " LINK "DirList_ErrorTable"} Error Table
@endnode

@node "DirList_Introduction" "Introduction"

    DirList Object is something I created for my own needs.

    Now  it  is grown to a powerful and stable object, so I decided to share it
with all the rest of Amiga Foundation Classes community.

    Main features are:

        * Accept AmigaDOS Pattern Matching.

        * Very fast scanning algorithms.

        * Easy to use.

        * Relys on StringNode Object. (See StringNode_oo)


NEW V2.10 Features:

        * Added a new method called tagset():
          With this method you will be able to change some DirList
          behaviours via tags (at the moment, just two different tags
          are implemented, but many others will do as time goes by)

        * Now dirname() returns also the "/" when needed.

        * Example program now working ;)

        * New examples added.

NEW V3.00 Features:

        * Restructured code.

        * Part of the Amiga Foundation Classes
@endnode

@node author "Author(s) Info"

    Original By:  Fabio Rotondo  (fsoft@intercom.it)

    E Version By: Fabio Rotondo



    Address:

            Fabio Rotondo
            C.so Vercelli 9
            28100 Novara
            ITALY

            e-mail: fsoft@intercom.it
                    Fabio.Rotondo@deagostini.it

            Phone:  (ITA) - (0)321 -   459676  (home)
                    (ITA) - (0)2   - 38086520  (office)
                    (ITA) - (0)338 -  7336477  (GSM Phone)

            Fax:    (ITA) - (0)2   - 38086278

            Web:    http://www.intercom.it/~fsoft               (my home page)

                    http://www.intercom.it/~fsoft/ablast.html   (Amiga Blast Home Page)
@endnode

@node DirList_Tags "Amiga Foundation Classes Modules: DirList/Tag Table"


    TAG NAME        | VALUES (DEFAULT)| DESCRIPTION
+-------------------+-----------------+-----------------------------------
 TAGDIR_MARKDIR     |TRUE/FALSE(TRUE) | If TRUE, DirList will add the
                    |                 | leading "(DIR) " prefix to dir names.
                    |                 |
TAGDIR_COMPLETEPATH |TRUE/FALSE(FALSE)| If TRUE, DirList will add complete path
                    |                 | to the dirs and files read.
                    |                 |

Please, see also @{" StringNode/Tags Table" LINK "StringNode.guide/StringNode_TagsTable"}
@endnode

@node DirList_ErrorTable "Amiga Foundation Classes Modules: DirList / Error Table "
ERROR VALUE         | DESCRIPTION
--------------------+------------------------------------------------------
    $0000           | No memory.
    $0001           | Initialization failed.
    $0002           | Could not lock desired dir (ie. dir not found)
    $0003           | You are trying to use a class which failed to init.
    $0004           | You are trying to read "nothing" (ie: you haven't set a valid dir)
    $0005           | Examine() call failed.

Please, see also @{" StringNode/Error Table" LINK "StringNode.guide/StringNode_ErrorTable"}

@endnode

@node "DirList_DirList" "Amiga Foundation Classes Modules: DirList/dirlist()"
           NAME: dirlist()

    DESCRIPTION: Use this command to initailize the object.

          INPUT: NONE.

        RESULTS: NONE.

       SEE ALSO: @{" StringNode/stringnode() " LINK "StringNode.guide/StringNode_stringnode"}
@endnode

@node "DirList_setdir" "Amiga Foundation Classes Modules: DirList/setdir()"
           NAME: setdir(path:PTR TO CHAR)

    DESCRIPTION: Use this command to select directory to scan.

          INPUT: path     - PTR TO CHAR. Directory name, FULL PATH!

        RESULTS: NONE.

       SEE ALSO: @{" dirname() " LINK "DirList_dirname"}
                 @{" read()    " LINK "DirList_read"}
@endnode

@node DirList_dirname "Amiga Foundation Classes Modules: DirList/dirname()"
           NAME: dirname()

    DESCRIPTION: This command returns the current dir name.

          INPUT: NONE.

        RESULTS: name       - A PTR TO CHAR containing current dir name.

       SEE ALSO: @{" setdir() " LINK "DirList_setdir"}
@endnode

@node DirList_read "Amiga Foundation Classes Modules: DirList/read()"
           NAME: read(dirs=TRUE, files=TRUE, match=NIL:PTR TO CHAR)

    DESCRIPTION: This command scans selected dir.

          INPUT: dirs       - (TRUE) If this flag is set to TRUE, DirList
                              will memorize any directory it will encounter
                              while scanning.

                 files      - (TRUE) Same as dirs flag, only with files.

                 match      - (NIL) This is a _VALID_ search pattern. This
                              pattern will be CASE INSENSITIVE and it is a
                              _STANDARD_ AmigaDOS pattern matching. (By the
                              way, DirList *USES* AmigaDOS pattern matching,
                              so it is FAST and you already should know how
                              to use it!)

                              Ex. "#?sequ#?" is a valid pattern matching
                                  string.

        RESULTS: NONE

       SEE ALSO: @{" setdir() " LINK "DirList_setdir"}
@endnode

@node "DirList_setattrs" "Amiga Foundation Classes Modules: DirList/setattrs()"
           NAME: setmode(tags:PTR TO LONG)

    DESCRIPTION: Use this command to change some of object's behaviours.
                 This method will grow as time goes by. It is implemented
                 in a very comfy way: taglists.

          INPUT: tags     - PTR TO LONG. Tags and their value.
                            See @{" Tags Table " LINK "DirList_Tags"}

        RESULTS: NONE.

           NOTE: REMEMBER to ALWAYS end taglist with 0,0, otherwise
                 strange things WILL happen.

                 You can pass to this method also StringNode's tags.
                 They will be handled correctly.

       SEE ALSO: @{" dirname() " LINK "DirList_dirname"}
                 @{" read()    " LINK "DirList_read"}

                 @{" StringNode/setattrs " LINK "StringNode.guide/StringNode_setattrs"}
@endnode

@node "DirList_version" "Amiga Foundation Classes Modules: DirList/version()"
           NAME: version()

    DESCRIPTION: This method returns class version and revision.

          INPUT: NONE

        RESULTS: this method return TWO values: version and revision.

       SEE ALSO:

@endnode

