xbmc
StackDirectory.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "IDirectory.h"
12 #include "utils/RegExp.h"
13 
14 #include <string>
15 #include <vector>
16 
17 namespace XFILE
18 {
19  class CStackDirectory : public IDirectory
20  {
21  public:
23  ~CStackDirectory() override;
24  bool GetDirectory(const CURL& url, CFileItemList& items) override;
25  bool AllowAll() const override { return true; }
26  static std::string GetStackedTitlePath(const std::string &strPath);
27  static std::string GetStackedTitlePath(const std::string &strPath, VECCREGEXP& RegExps);
28  static std::string GetFirstStackedFile(const std::string &strPath);
29  static bool GetPaths(const std::string& strPath, std::vector<std::string>& vecPaths);
30  static std::string ConstructStackPath(const CFileItemList& items, const std::vector<int> &stack);
31  static bool ConstructStackPath(const std::vector<std::string> &paths, std::string &stackedPath);
32  };
33 }
bool GetDirectory(const CURL &url, CFileItemList &items) override
Get the items of the directory strPath.
Definition: StackDirectory.cpp:28
Interface to the directory on a file system.
Definition: IDirectory.h:50
Definition: Scraper.h:41
Represents a list of files.
Definition: FileItem.h:713
Definition: URL.h:20
Definition: StackDirectory.h:19
bool AllowAll() const override
Whether to allow all files/folders to be listed.
Definition: StackDirectory.h:25