CppCommon  1.0.4.1
C++ Common Library
filesystem_symlink.cpp

Filesystem symlink example

#include <iostream>
int main(int argc, char** argv)
{
CppCommon::Symlink symlink("example.lnk");
// Create a new symbolic link from the executable path
// Read symbolic link target
std::cout << "Symbolic link target: " << symlink.target() << std::endl;
// Remove symbolic link
return 0;
}
static Path Remove(const Path &path)
Remove the given path (file, empty directory, symlink, etc) from the filesystem.
Definition: path.cpp:1209
static Path executable()
Get the executable path of the process.
Definition: path.cpp:910