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 » FindFile::IsExecutable() [Feature request]
Re: FindFile::IsExecutable() [Feature request] [message #25698 is a reply to message #25685] Mon, 08 March 2010 16:55 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
dolik.rce wrote on Sun, 07 March 2010 15:51

Hello,
Would it be possible to add IsExecutable() method to FindFile? Implementation is quite simple, for Linux:
bool FindFile::IsExecutable() const { return (!IsDirectory()) && ((S_IXUSR|S_IXGRP|S_IXOTH) & GetMode());}
And for windows (this could be optimized):
bool FindFile::IsExecutable() const { return ToLower(GetName()).EndsWith(".exe"); }

What do you think?

Best regards,
Honza


What about directory with .exe extension in Windows? Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format(Time time, bool seconds) problem
Next Topic: CParser enhancements
Goto Forum:
  


Current Time: Sat Jun 15 22:48:45 CEST 2024

Total time taken to generate the page: 0.03320 seconds