readLink() is present in linux and is defined in unistd.h,is there any similar type function in windows please provide or else if we can make a function with similar functionality.I want to use the same functionality as readLink() please provide a user defined function for the replacement of the function in case no predefined function is there provided snap of the code
char buffer[2048];
readlink("/proc/self/exe", buffer, 2048);
std::stringstream ss;
ss << buffer;
std::string exeFile = ss.str();
std::string directory;
const size_t last_slash_idx = exeFile.rfind('/');
if (std::string::npos != last_slash_idx)
{
directory = exeFile.substr(0, last_slash_idx);
}
return directory;
#endif