mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 18:31:22 +02:00
src/system/helpers.cpp: Add function readLink()
This commit is contained in:
@@ -1272,3 +1272,13 @@ std::string Lang2ISO639_1(std::string& lang)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
string readLink(string lnk)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
memset(buf, 0, sizeof(buf)-1);
|
||||
if (readlink(lnk.c_str(), buf, sizeof(buf)-1) != -1)
|
||||
return (string)buf;
|
||||
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user