mirror of
				https://github.com/Laupetin/OpenAssetTools.git
				synced 2025-11-04 04:27:15 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			562 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			562 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "OatTestPaths.h"
 | 
						|
 | 
						|
#include <filesystem>
 | 
						|
 | 
						|
namespace fs = std::filesystem;
 | 
						|
 | 
						|
namespace oat::paths
 | 
						|
{
 | 
						|
    std::filesystem::path GetSourceDirectory()
 | 
						|
    {
 | 
						|
        return fs::current_path() / "src";
 | 
						|
    }
 | 
						|
 | 
						|
    std::filesystem::path GetTestDirectory()
 | 
						|
    {
 | 
						|
        return fs::current_path() / "test";
 | 
						|
    }
 | 
						|
 | 
						|
    std::filesystem::path GetTempDirectory()
 | 
						|
    {
 | 
						|
        auto result = fs::current_path() / "build" / ".tmp";
 | 
						|
        if (!fs::is_directory(result))
 | 
						|
            fs::create_directories(result);
 | 
						|
 | 
						|
        return result;
 | 
						|
    }
 | 
						|
} // namespace oat::paths
 |