Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. tree.hxx
  5. Abstract:
  6. This module contains the definition of the TREE class.
  7. The TREE class implements a tree utility functionally compatible
  8. with the DOS 5 tree utility.
  9. This utility displays the directory structure of a path or drive.
  10. Usage:
  11. TREE [drive:][path] [/F] [/A] [/?]
  12. /F Display the names of files in each directory.
  13. /A Uses ASCII instead of extended characters.
  14. /? Displays a help message.
  15. Author:
  16. Jaime F. Sasson - jaimes - 13-May-1991
  17. Environment:
  18. ULIB, User Mode
  19. --*/
  20. #if ! defined( _TREE_ )
  21. #define _TREE_
  22. #include "object.hxx"
  23. #include "keyboard.hxx"
  24. #include "program.hxx"
  25. DECLARE_CLASS( TREE );
  26. class TREE : public PROGRAM {
  27. public:
  28. DECLARE_CONSTRUCTOR( TREE );
  29. NONVIRTUAL
  30. BOOLEAN
  31. Initialize (
  32. );
  33. NONVIRTUAL
  34. BOOLEAN
  35. DisplayName (
  36. IN PCFSNODE Fsn,
  37. IN PCWSTRING String
  38. );
  39. NONVIRTUAL
  40. VOID
  41. DisplayVolumeInfo (
  42. );
  43. NONVIRTUAL
  44. BOOLEAN
  45. ExamineDirectory(
  46. IN PCFSN_DIRECTORY Directory,
  47. IN PCWSTRING String
  48. );
  49. NONVIRTUAL
  50. PFSN_DIRECTORY
  51. GetInitialDirectory(
  52. ) CONST;
  53. NONVIRTUAL
  54. VOID
  55. Terminate(
  56. );
  57. private:
  58. PSTREAM _StandardOutput;
  59. FLAG_ARGUMENT _FlagDisplayFiles;
  60. FLAG_ARGUMENT _FlagUseAsciiCharacters;
  61. FLAG_ARGUMENT _FlagDisplayHelp;
  62. PFSN_DIRECTORY _InitialDirectory;
  63. FSN_FILTER _FsnFilterDirectory;
  64. FSN_FILTER _FsnFilterFile;
  65. STREAM_MESSAGE _Message;
  66. DSTRING _StringForDirectory;
  67. DSTRING _StringForLastDirectory;
  68. DSTRING _StringForFile;
  69. DSTRING _StringForFileNoDirectory;
  70. DSTRING _EndOfLineString;
  71. PWSTRING _VolumeName;
  72. VOL_SERIAL_NUMBER _SerialNumber;
  73. BOOLEAN _FlagAtLeastOneSubdir;
  74. BOOLEAN _FlagPathSupplied;
  75. };
  76. INLINE
  77. PFSN_DIRECTORY
  78. TREE::GetInitialDirectory(
  79. ) CONST
  80. /*++
  81. Routine Description:
  82. Returns to the caller a pointer to the fsnode corresponding to
  83. the directory to be used as the root of the tree.
  84. Arguments:
  85. None.
  86. Return Value:
  87. PFSN_DIRECTORY - Pointer to the fsnode that describes the starting
  88. directory.
  89. --*/
  90. {
  91. return( _InitialDirectory );
  92. }
  93. #endif // _TREE_