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.

159 lines
4.8 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. dir.hxx
  5. Abstract:
  6. This module contains the declaration for the FSN_DIRECTORY class.
  7. FSN_DIRECTORY is derived from the abstract FSNODE class. It offers an
  8. interface which supports the manipulation of DIRECTORIES. It's primary
  9. purpose is to support the creation of lists of FSNODE (e.g. FILE and
  10. DIRECTORY) objects that meet some criteria (see FSN_FILETER)and to
  11. manipulate (e.g. copy, move) FSNODEs which are 'owned' by a FSN_DIRECTORY.
  12. Author:
  13. David J. Gilman (davegi) 09-Jan-1991
  14. Environment:
  15. ULIB, User Mode
  16. --*/
  17. #if ! defined( _FSN_DIRECTORY_ )
  18. #define _FSN_DIRECTORY_
  19. #include "fsnode.hxx"
  20. //
  21. // Forward references
  22. //
  23. DECLARE_CLASS( FSN_DIRECTORY );
  24. DECLARE_CLASS( FSN_FILE );
  25. DECLARE_CLASS( FSN_FILTER );
  26. DECLARE_CLASS( FSNODE );
  27. DECLARE_CLASS( PATH );
  28. //
  29. // Type of the callback function for the Traverse method
  30. //
  31. typedef BOOLEAN (*CALLBACK_FUNCTION)( IN PVOID Object, IN OUT PFSNODE Node, IN PPATH DestinationPath);
  32. //
  33. // Type of the confirmation function for Copy method.
  34. //
  35. typedef BOOLEAN (*CONFIRM_COPY_FUNCTION)( IN PCFSNODE Source,
  36. IN OUT PPATH DestinationPath );
  37. class FSN_DIRECTORY : public FSNODE {
  38. friend class FSN_FILTER;
  39. friend class SYSTEM;
  40. public:
  41. DECLARE_CAST_MEMBER_FUNCTION( FSN_DIRECTORY );
  42. /*
  43. NONVIRTUAL
  44. PFSN_DIRECTORY
  45. CreateDirectory (
  46. IN PCPATH Path
  47. ) CONST;
  48. */
  49. NONVIRTUAL
  50. ULIB_EXPORT
  51. PFSN_DIRECTORY
  52. CreateDirectoryPath (
  53. IN PCPATH Path
  54. ) CONST;
  55. NONVIRTUAL
  56. PFSN_FILE
  57. CreateFile (
  58. IN PCPATH Path,
  59. IN BOOLEAN OverWrite DEFAULT FALSE
  60. ) CONST;
  61. NONVIRTUAL
  62. BOOLEAN
  63. Copy (
  64. IN PFSN_FILTER FsnFilter,
  65. IN PCFSN_DIRECTORY DestinationDir,
  66. IN BOOLEAN Recurse DEFAULT FALSE,
  67. IN BOOLEAN OverWrite DEFAULT FALSE
  68. ) CONST;
  69. NONVIRTUAL
  70. ULIB_EXPORT
  71. BOOLEAN
  72. DeleteDirectory (
  73. );
  74. NONVIRTUAL
  75. BOOLEAN
  76. DeleteFsNode (
  77. IN PCFSN_FILTER FsnFilter,
  78. IN BOOLEAN Recurse DEFAULT FALSE
  79. ) CONST;
  80. NONVIRTUAL
  81. ULIB_EXPORT
  82. BOOLEAN
  83. IsEmpty (
  84. ) CONST;
  85. NONVIRTUAL
  86. BOOLEAN
  87. Move (
  88. IN PCFSN_FILTER FsnFilter,
  89. IN PCSTR DestinationName DEFAULT NULL,
  90. IN PCFSN_DIRECTORY DestinationDir DEFAULT NULL,
  91. IN BOOLEAN Recurse DEFAULT FALSE,
  92. IN BOOLEAN OverWrite DEFAULT FALSE
  93. ) CONST;
  94. NONVIRTUAL
  95. ULIB_EXPORT
  96. PARRAY
  97. QueryFsnodeArray (
  98. IN PFSN_FILTER FsnFilter DEFAULT NULL
  99. ) CONST;
  100. NONVIRTUAL
  101. ULIB_EXPORT
  102. BOOLEAN
  103. Traverse (
  104. IN PVOID Object,
  105. IN PFSN_FILTER FsnFilter,
  106. IN OUT PPATH DestinationPath,
  107. IN CALLBACK_FUNCTION CallBackFunction
  108. ) CONST;
  109. NONVIRTUAL
  110. ULIB_EXPORT
  111. PFSNODE
  112. GetNext (
  113. IN OUT HANDLE *hndl,
  114. OUT PDWORD error
  115. );
  116. protected:
  117. DECLARE_CONSTRUCTOR( FSN_DIRECTORY );
  118. private:
  119. };
  120. #endif // _FSN_DIRECTORY_