$save nolist /* *============================================================================ * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE * * Permission to use for any purpose, modify, copy, and make enhancements * and derivative works of the software is granted if attribution is given to * R.M. Gillmore, dba the ACME Software Deli, as the author * * While the ACME Software Deli does not work for money, there is nonetheless * a significant amount of work involved. The ACME Software Deli maintains the * rights to all code written, though it may be used and distributed as long as * the following conditions are maintained. * * 1. The copyright statement at the top of each code block is maintained in * your distribution. * 2. You do not identify yourself as the ACME Software Deli * 3. Any changes made to the software are sent to the ACME Software Deli *============================================================================ */ /* * $Id: fileTree.ext 1157 2025-05-05 00:35:39Z rmgillmore $ */ $if not FILETREE_EXT_INCLUDED $set ( FILETREE_EXT_INCLUDED ) $include (..\lib\dosFind.ext) /* * this object is returned from the openDirTree (a constructor, sort of) function */ declare fileTreeDir literally ' structure ( findData findDataRecordType )'; $if not fileTreeSource /* Constructors */ /* ***************************************************************************** * openDirTree() accepts the name of a directory (fully-qualified is NOT * necessary) and a file mask ('*.*' is assumed if not provided), creates a * fileTree "object", stores the fully-qualified name there, gets the * first entry in the directory (storing it as the first entry), then * returns the address of the fileTree "object" ***************************************************************************** */ openDirTree: procedure ( baseDir, fileMask, walkDirTree ) pointer external; declare baseDir pointer, /* the name of the directory */ fileMask pointer, walkDirTree boolean; /* when True, recurse the tree */ end openDirTree; /* ***************************************************************************** * closeDirTree() closes all of the records related to the directory noted, * restores the location, and returns ZERO if all worked well, and NON-ZERO * if there was an error ***************************************************************************** */ closeDirTree: procedure ( dirPtr ) integer external; declare dirPtr pointer; /* directory information */ end closeDirTree; /* Accesssors */ /* ***************************************************************************** * nextDirTreeEntry() uses the information in the fileTree "object" to * retrieve the next directory entry. It is the information related to that * entry that is returned. If the last entry was already returned, a "no * more entries" notion is returned ***************************************************************************** */ nextDirTreeEntry: procedure ( dirPtr ) pointer external; declare dirPtr pointer; /* directory information */ end nextDirTreeEntry; $endif $endif $restore