simgear/misc/sg_path.*: added SGPath::makeLink(), for making softlinks.
Note that on Windows there is no implementation yet and it always returns false.
This commit is contained in:
parent
b888a46e67
commit
a7a53921e4
@ -1108,3 +1108,15 @@ bool SGPath::touch()
|
||||
_cached = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SGPath::makeLink(const std::string& destination)
|
||||
{
|
||||
#ifdef SG_WINDOWS
|
||||
return false;
|
||||
#else
|
||||
if (symlink(destination.c_str(), c_str())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
@ -289,6 +289,11 @@ public:
|
||||
*/
|
||||
bool touch();
|
||||
|
||||
/**
|
||||
* Create a link with this path that points to <destination>.
|
||||
*/
|
||||
bool makeLink(const std::string& destination);
|
||||
|
||||
enum StandardLocation
|
||||
{
|
||||
HOME,
|
||||
|
Loading…
Reference in New Issue
Block a user