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.

70 lines
1.8 KiB

  1. #ifndef _FILEFIND_H_
  2. #define _FILEFIND_H_
  3. ////////////////////////////////////////////////////////////////////////////
  4. // Local file searches
  5. class CFindFile : public CObject
  6. {
  7. public:
  8. CFindFile();
  9. virtual ~CFindFile();
  10. // Attributes
  11. public:
  12. DWORD GetLength() const;
  13. #if defined(_X86_) || defined(_ALPHA_)
  14. __int64 GetLength64() const;
  15. #endif
  16. virtual CString GetFileName() const;
  17. virtual CString GetFilePath() const;
  18. virtual CString GetFileTitle() const;
  19. virtual CString GetFileURL() const;
  20. virtual CString GetRoot() const;
  21. virtual BOOL GetLastWriteTime(FILETIME* pTimeStamp) const;
  22. virtual BOOL GetLastAccessTime(FILETIME* pTimeStamp) const;
  23. virtual BOOL GetCreationTime(FILETIME* pTimeStamp) const;
  24. virtual BOOL GetLastWriteTime(CTime& refTime) const;
  25. virtual BOOL GetLastAccessTime(CTime& refTime) const;
  26. virtual BOOL GetCreationTime(CTime& refTime) const;
  27. virtual BOOL MatchesMask(DWORD dwMask) const;
  28. virtual BOOL IsDots() const;
  29. // these aren't virtual because they all use MatchesMask(), which is
  30. BOOL IsReadOnly() const;
  31. BOOL IsDirectory() const { return MatchesMask(FILE_ATTRIBUTE_DIRECTORY); };
  32. BOOL IsCompressed() const;
  33. BOOL IsSystem() const;
  34. BOOL IsHidden() const;
  35. BOOL IsTemporary() const;
  36. BOOL IsNormal() const;
  37. BOOL IsArchived() const;
  38. // Operations
  39. void Close();
  40. virtual BOOL FindFile(LPCTSTR pstrName = NULL, DWORD dwUnused = 0);
  41. virtual BOOL FindNextFile();
  42. protected:
  43. virtual void CloseContext();
  44. // Implementation
  45. protected:
  46. void* m_pFoundInfo;
  47. void* m_pNextInfo;
  48. HANDLE m_hContext;
  49. BOOL m_bGotLast;
  50. CString m_strRoot;
  51. TCHAR m_chDirSeparator; // not '\\' for Internet classes
  52. #ifdef _DEBUG
  53. void Dump(CDumpContext& dc) const;
  54. void AssertValid() const;
  55. #endif
  56. DECLARE_DYNAMIC(CFindFile)
  57. };
  58. #endif