#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
String parentDir = GetFileDirectory(GetExeFilePath()), targetDir = AppendFileName(parentDir, "dir");
//RealizeDirectory(targetDir);
//Sys(Format("ln -s %s link", targetDir));
Sys(Format("ln -s %s link_to_dir", GetExeFilePath()));
FindFile ff(AppendFileName(parentDir, "*"));
while (ff.Next()) {
Cout().PutLine(Format("%s: %s", ff.GetName(), ff.IsSymLink() ? "true" : "false"));
}
Cout().PutLine(Sys("ls -la " + parentDir));
DeleteFile(AppendFileName(parentDir, "link"));
DirectoryDelete(targetDir);
}
FindFile(const char *name, bool use_lstat = false);
bool Search(const char *path, bool use_lstat = false);