Deprecated FileSystemAdapter::getHomeFolder().

This commit is contained in:
2025-03-28 11:44:15 +01:00
parent e35f5a35f8
commit d7f968db3a
3 changed files with 15 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ namespace mijin
struct FileInfo
{
fs::path path;
/// either file size in bytes, or number of entries if folder
std::size_t size = 0;
bool exists : 1 = false;
bool isFolder : 1 = false;
@@ -79,7 +80,8 @@ class FileSystemAdapter
public:
virtual ~FileSystemAdapter() = default;
[[nodiscard]] virtual fs::path getHomeFolder() = 0;
[[deprecated("Will be removed ASAP")]]
[[nodiscard]] virtual fs::path getHomeFolder() { return {}; } // TODO: get rid of this ...
[[nodiscard]] virtual std::vector<FileInfo> listFiles(const fs::path& folder) = 0;
[[nodiscard]] virtual FileInfo getFileInfo(const fs::path& file) = 0;
[[nodiscard]] virtual Optional<fs::path> getNativePath(const fs::path& /* file */) { return NULL_OPTIONAL; }