#pragma region CPL License /* Nuclex Native Framework Copyright (C) 2002-2021 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion // CPL License #ifndef NUCLEX_STORAGE_FILESYSTEM_WINDOWS_STANDARDDIRECTORYRESOLVER_H #define NUCLEX_STORAGE_FILESYSTEM_WINDOWS_STANDARDDIRECTORYRESOLVER_H #include "Nuclex/Storage/Config.h" #if defined(NUCLEX_STORAGE_WIN32) #include "../../Helpers/WindowsApi.h" // in case ShlObj.h wants to include Windows.h #include // KNOWNFOLDERID enum #include // std::string #include // std::vector namespace Nuclex { namespace Storage { namespace FileSystem { namespace Windows { // ------------------------------------------------------------------------------------------- // /// Resolves the location of standard directories in Windows class StandardDirectoryResolver { /// Retrieves the path of a special folder /// CSIDL enumeration member indicating the folder to look up /// Whether the folder should be created if it doesn't exist /// The path to the requested special folder public: static std::string GetFolderPath(int csidl); /// Retrieves the path of a known folder /// ID of the known folder whose path will be retrieved /// The path of the specified known folder /// /// If you need to retrieve multiple known folders, consider using the /// method. Querying known folders can /// be very expensive and requesting multiple folders in one go makes sure this /// performance cost isn't paid multiple times. /// public: static std::string GetKnownFolder(const KNOWNFOLDERID &knownFolderId); /// Retrieves the paths of multiple known folders /// /// IDs of the known folders whose paths will be retrieved /// /// The paths of the requested known folders /// /// This method is more efficient if you need to query for multiple knwon folders /// because it does the expensive setup work only once. /// public: static std::vector GetMultipleKnownFolders( const std::vector &knownFolderIds ); }; // ------------------------------------------------------------------------------------------- // }}}} // namespace Nuclex::Storage::FileSystem::Windows #endif // defined(NUCLEX_STORAGE_WIN32) #endif // NUCLEX_STORAGE_FILESYSTEM_WINDOWS_STANDARDDIRECTORYRESOLVER_H