2025-06-11 11:48:31 +02:00
|
|
|
#ifndef FILE_SERVICE_H
|
|
|
|
|
#define FILE_SERVICE_H
|
2025-06-10 16:45:58 +02:00
|
|
|
|
|
|
|
|
#include <string>
|
2025-06-11 11:48:31 +02:00
|
|
|
#include <vector>
|
2025-06-10 16:45:58 +02:00
|
|
|
|
2025-06-11 11:48:31 +02:00
|
|
|
class FileService {
|
2025-06-10 16:45:58 +02:00
|
|
|
public:
|
|
|
|
|
static bool doesNonEmptyFileExist(std::string);
|
|
|
|
|
static void emptyFile(std::string);
|
|
|
|
|
static void createOrOverwriteFile(std::string, std::string);
|
2025-06-11 11:48:31 +02:00
|
|
|
static void appendToFile(std::string, std::string);
|
|
|
|
|
static void deleteNthLine(std::string, int);
|
|
|
|
|
static std::vector<std::string> readLines(std::string);
|
2025-06-10 16:45:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|