reactos/dll/win32/shell32/shelldesktop/CDirectoryList.h
Katayama Hirofumi MZ 91acf823d8
[SHELL32] SHChangeNotify: Use tree for CDirectoryList (#6784)
Optimize for speed and memory.
JIRA issue: CORE-13950
CDirectoryList class exists just for remembering which file item is a directory or
not, in order to notify the filesystem item changes. This information can
become a tree data structure.

- Add CFSPathIterator and CFSNode helper classes.
- CFSNode is a class for tree nodes.
- Re-implement CDirectoryList class by using tree nodes.
- Delete CDirectoryItem class.
2024-04-24 19:44:30 +09:00

34 lines
903 B
C++

/*
* PROJECT: shell32
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Shell change notification
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#pragma once
#include <atlsimpcoll.h> // for CSimpleArray
//////////////////////////////////////////////////////////////////////////////
class CFSNode;
// the directory list
class CDirectoryList
{
public:
CDirectoryList(CFSNode *pRoot);
CDirectoryList(CFSNode *pRoot, LPCWSTR pszDirectoryPath, BOOL fRecursive);
~CDirectoryList();
BOOL ContainsPath(LPCWSTR pszPath) const;
BOOL AddPath(LPCWSTR pszPath);
BOOL AddPathsFromDirectory(LPCWSTR pszDirectoryPath);
BOOL RenamePath(LPCWSTR pszPath1, LPCWSTR pszPath2);
BOOL DeletePath(LPCWSTR pszPath);
void RemoveAll();
protected:
CFSNode *m_pRoot;
BOOL m_fRecursive;
};