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.

119 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1991-2000 Microsoft Corporation
  3. Module Name:
  4. file.hxx
  5. Abstract:
  6. This module contains the declaration for the FSN_FILE class. FSN_FILE
  7. is derived from the abstract FSNODE class. It offers an interface which
  8. supports manipulation of the external (i.e. non data) portion of files.
  9. Author:
  10. David J. Gilman (davegi) 09-Jan-1991
  11. Environment:
  12. ULIB, User Mode
  13. --*/
  14. #if ! defined( _FSN_FILE_ )
  15. #define _FSN_FILE_
  16. #include "fsnode.hxx"
  17. #include "filestrm.hxx"
  18. //
  19. // Forward references
  20. //
  21. DECLARE_CLASS( FSN_FILE );
  22. DECLARE_CLASS( FSN_FILTER );
  23. class FSN_FILE : public FSNODE {
  24. friend FSN_FILTER;
  25. friend SYSTEM;
  26. public:
  27. DECLARE_CAST_MEMBER_FUNCTION( FSN_FILE );
  28. NONVIRTUAL
  29. ULIB_EXPORT
  30. BOOLEAN
  31. Copy (
  32. IN OUT PPATH NewFile,
  33. OUT PCOPY_ERROR ErrorCode DEFAULT NULL,
  34. IN ULONG CopyFlags DEFAULT 0,
  35. IN LPPROGRESS_ROUTINE CallBack DEFAULT NULL,
  36. IN VOID * Data DEFAULT NULL,
  37. IN PBOOL Cancel DEFAULT NULL
  38. ) CONST;
  39. VIRTUAL
  40. BOOLEAN
  41. DeleteFromDisk(
  42. IN BOOLEAN Force DEFAULT FALSE
  43. );
  44. NONVIRTUAL
  45. ULONG64
  46. QuerySize (
  47. ) CONST;
  48. ULIB_EXPORT
  49. PFILE_STREAM
  50. QueryStream (
  51. IN STREAMACCESS Access,
  52. IN DWORD Attributes DEFAULT 0
  53. );
  54. protected:
  55. DECLARE_CONSTRUCTOR( FSN_FILE );
  56. private:
  57. };
  58. INLINE
  59. ULONG64
  60. FSN_FILE::QuerySize (
  61. ) CONST
  62. /*++
  63. Routine Description:
  64. Return the size of the file in bytes.
  65. Arguments:
  66. None.
  67. Return Value:
  68. ULONG - returns the file size
  69. --*/
  70. {
  71. ULARGE_INTEGER x;
  72. x.LowPart = _FileData.nFileSizeLow;
  73. x.HighPart = _FileData.nFileSizeHigh;
  74. return x.QuadPart;
  75. }
  76. #endif // _FSN_FILE_