2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "IDirectory.h"
20 \brief Wrappers for \e IDirectory
26 virtual ~CDirectory(void);
32 int flags
= DIR_FLAG_DEFAULTS
;
35 static bool GetDirectory(const CURL
& url
36 , CFileItemList
&items
37 , const std::string
&strMask
40 static bool GetDirectory(const CURL
& url
,
41 const std::shared_ptr
<IDirectory
>& pDirectory
,
45 static bool GetDirectory(const CURL
& url
46 , CFileItemList
&items
47 , const CHints
&hints
);
49 static bool Create(const CURL
& url
);
50 static bool Exists(const CURL
& url
, bool bUseCache
= true);
51 static bool Remove(const CURL
& url
);
52 static bool RemoveRecursive(const CURL
& url
);
54 static bool GetDirectory(const std::string
& strPath
55 , CFileItemList
&items
56 , const std::string
&strMask
59 static bool GetDirectory(const std::string
& strPath
,
60 const std::shared_ptr
<IDirectory
>& pDirectory
,
62 const std::string
& strMask
,
65 static bool GetDirectory(const std::string
& strPath
66 , CFileItemList
&items
67 , const CHints
&hints
);
69 static bool Create(const std::string
& strPath
);
70 static bool Exists(const std::string
& strPath
, bool bUseCache
= true);
71 static bool Remove(const std::string
& strPath
);
72 static bool RemoveRecursive(const std::string
& strPath
);
74 /*! \brief Filter files that act like directories from the list, replacing them with their directory counterparts
75 \param items The item list to filter
76 \param mask The mask to apply when filtering files
77 \param expandImages True to include disc images in file directory expansion
79 static void FilterFileDirectories(CFileItemList
&items
, const std::string
&mask
,
80 bool expandImages
=false);