2.13 Scan Order

All TSAs must follow a specified scanning order if parent handles are used. The scan travels down the left side of the tree before traversing the right side as shown by the following steps:

  1. Upon entering a parent, all the children of the current parent are scanned.

  2. The next parent to scan is found. If the current parent has parents or subdirectories, each one is scanned by repeating Steps 1 and 2.

  3. If the current parent does not have any more parents to scan, the scan of the current parent is considered finished and the scan traverses up the file system tree until the next parent to scan is found. Steps 1-3 are repeated.

  4. If there are no more parents to find, the scan ends.

To illustrate this, let's consider the root of the scan as parent A. When the scan begins, the name of parent A is returned. Next, the children's names of parent A are returned which are: a, b, and c. Since there are no more children in parent A to scan, the name of the first parent in A-which is B-is returned. The steps are then repeated so that the children's names of parent B are returned next. Since there are no more children in B to scan, the next parent in B-which is C is scanned. Once the scan is done with parent C, the scan continues with parent D. The process continues until the scan stops with parent I

Figure 2-4 Scan Order

Illustrates the scan order