User Tools

Site Tools


c_-_c_files:get_path_to_temp_directory

C - C++ Files - Get path to temp directory

temp_directory.hpp

#pragma once
 
#include <string>
 
std::string get_temp_directory();

temp_directory.cpp

#include "temp_directory.hpp"
#include <filesystem>
 
#if __cplusplus > 201402L
  namespace fs = std::filesystem;
#else
  namespace fs = std::experimental::filesystem;
#endif
 
 
std::string get_temp_directory()
{
  return fs::temp_directory_path().string();
}

References

c_-_c_files/get_path_to_temp_directory.txt · Last modified: 2021/04/28 09:38 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki