#pragma once

#include "Types.hpp"
#include <fstream>

namespace TSE
{
    /// @brief checks if a file exists at a path
    /// @param path the path to check
    /// @return file exists
    bool FileExists(const std::string& path);
    /// @brief opens a path for reading
    /// @param stream the stream to be assigned
    /// @param path the path to open
    void OpenFileReading(std::ifstream& stream, const std::string& path);
    /// @brief opens a path for writing
    /// @param stream the stream to be assigned
    /// @param path the path to open
    void CreateFileWriting(std::ofstream& stream, const std::string& path);
    /// @brief opens a path for appending
    /// @param stream the stream to be assigned
    /// @param path the path to open
    void AppendFileWriting(std::ofstream& stream, const std::string& path);

    /// @brief gets the platform specific tmp folder in appdata or .local
    /// @param path the resulting path
    void GetAppDataPath(std::string& path);
    /// @brief combines two paths in a platform specific way
    /// @param res the resulting path
    /// @param path1 path part 1
    /// @param path2 path part 2
    void CombinePaths(std::string& res,const std::string& path1,const std::string& path2);
} // namespace TSE
