018fdf5516
Update the Database class to include explicit methods for fetching various entity types, managing relationships, and querying file paths. Implement hashing logic in the File module to facilitate tracking by unique identifiers. Add C++20 support in configuration files.
25 lines
587 B
C++
25 lines
587 B
C++
#pragma once
|
|
|
|
#include "Containers.h"
|
|
|
|
#include <filesystem>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
class File {
|
|
public:
|
|
Track importFile( const std::string& filePath );
|
|
void importFolder( const std::string& folderPath, std::vector<Track>& tracks );
|
|
void readFileTag( Track& t );
|
|
std::string parseFiletype( const std::string& path );
|
|
void updateLibrary();
|
|
uint64_t hashString( Track t );
|
|
|
|
private:
|
|
std::string path_;
|
|
fs::path musicFolder_ = "data/";
|
|
std::string fileName_;
|
|
};
|