Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Symlink/Shortcut support
Re: Symlink/Shortcut support [message #24995 is a reply to message #24976] Sat, 06 February 2010 23:13 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
luzr wrote on Sat, 06 February 2010 19:40

koldo wrote on Sat, 06 February 2010 08:30

luzr wrote on Sat, 06 February 2010 13:20

Like this:

bool FindFile::IsSymLink() const
{
	String name = GetName();
	if(GetFileExt(name) != ".lnk")
		return false;
	return !IsNull(GetSymLinkPath(AppendFileName(path, name)));
}


Mirek

Well. It is not the most efficient possible but it is very valid.


Why? System calls appear to be equivalent for the test and for obtaining the path.

Mirek

Hello Mirek

Being punctilious Smile these is not necessary:

char fileW[_MAX_PATH] = {0};
psl->GetPath(fileW, _MAX_PATH, NULL, 0); 
path = FromSystemCharset(fileW);




Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: T* Detach() for ArrayMap
Next Topic: XmlParser patch
Goto Forum:
  


Current Time: Sat May 03 02:05:25 CEST 2025

Total time taken to generate the page: 0.01193 seconds