RigsofRods
Soft-body Physics Simulation
Namespaces | Functions
PlatformUtils.h File Reference

Platform-specific utilities. We use narrow UTF-8 encoded strings as paths. Inspired by http://utf8everywhere.org/ manifesto. Code based on https://github.com/only-a-ptr/filepaths4rigs. More...

#include <string>
#include <ctime>
+ Include dependency graph for PlatformUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 RoR
 

Functions

bool RoR::FileExists (const char *path)
 Path must be UTF-8 encoded. More...
 
bool RoR::FolderExists (const char *path)
 Path must be UTF-8 encoded. More...
 
void RoR::CreateFolder (const char *path)
 Path must be UTF-8 encoded. More...
 
bool RoR::FileExists (std::string const &path)
 
bool RoR::FolderExists (std::string const &path)
 
void RoR::CreateFolder (std::string const &path)
 
std::string RoR::PathCombine (std::string a, std::string b)
 
std::string RoR::GetUserHomeDirectory ()
 Returns UTF-8 path or empty string on error. More...
 
std::string RoR::GetExecutablePath ()
 Returns UTF-8 path or empty string on error. More...
 
std::string RoR::GetParentDirectory (const char *path)
 Returns UTF-8 path without trailing slash. More...
 
std::time_t RoR::GetFileLastModifiedTime (std::string const &path)
 
void RoR::OpenUrlInDefaultBrowser (std::string const &url)
 

Detailed Description

Platform-specific utilities. We use narrow UTF-8 encoded strings as paths. Inspired by http://utf8everywhere.org/ manifesto. Code based on https://github.com/only-a-ptr/filepaths4rigs.

Author
Petr Ohlidal
Date
05/2014

Definition in file PlatformUtils.h.