27 lines
650 B
C++
27 lines
650 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace platform {
|
|
|
|
/**
|
|
* Returns the OS-appropriate path separator character ('/' or '\\').
|
|
*/
|
|
char pathSeparator();
|
|
|
|
/**
|
|
* Returns true if the given path exists and is a directory.
|
|
*/
|
|
bool directoryExists(const std::string& path);
|
|
|
|
/**
|
|
* Create a uniquely-named subdirectory inside the system temporary directory.
|
|
*
|
|
* @param prefix Name prefix for the new directory.
|
|
* @param outPath Receives the full path of the created directory on success.
|
|
* @return True on success, false on failure.
|
|
*/
|
|
bool createTempDirectory(const std::string& prefix, std::string& outPath);
|
|
|
|
} // namespace platform
|