Line 41... |
Line 41... |
41 |
* D by date G group dirs first - prefix to reverse order
|
41 |
* D by date G group dirs first - prefix to reverse order
|
42 |
*
|
42 |
*
|
43 |
* /S Displays files in specified directory and all subdirectories.
|
43 |
* /S Displays files in specified directory and all subdirectories.
|
44 |
* /B Uses bare format (no heading information or summary)
|
44 |
* /B Uses bare format (no heading information or summary)
|
45 |
* /L Uses lowercases
|
45 |
* /L Uses lowercases
|
- |
|
46 |
*
|
- |
|
47 |
* about /S - recursive DIR on specified (or current) path and subdirectories:
|
- |
|
48 |
* prerequisite: some sort of mechanism that works as a stack pile of DTAs
|
- |
|
49 |
*
|
- |
|
50 |
* /S logic:
|
- |
|
51 |
* 1. do a FindFirst on current directory
|
- |
|
52 |
* 2. do FindNext calls in a loop, if a DIR entry is encountered, remember its
|
- |
|
53 |
* name and put a copy of the current DTA on stack, then continue the
|
- |
|
54 |
* listing without further interruption
|
- |
|
55 |
* 3. if a new DIR was discovered, do a FindFirst on it and jmp to 2.
|
- |
|
56 |
* if no DIR found, then go to 4.
|
- |
|
57 |
* 4. look on the stack for a DTA.
|
- |
|
58 |
* if any found, pop it and jmp to 2.
|
- |
|
59 |
* otherwise job is done, exit.
|
46 |
*/
|
60 |
*/
|
47 |
|
61 |
|
48 |
/* NOTE: /A attributes are matched in an exclusive way, ie. only files with
|
62 |
/* NOTE: /A attributes are matched in an exclusive way, ie. only files with
|
49 |
* the specified attributes are matched. This is different from how DOS
|
63 |
* the specified attributes are matched. This is different from how DOS
|
50 |
* itself matches attributes hence DIR cannot rely on the attributes
|
64 |
* itself matches attributes hence DIR cannot rely on the attributes
|