U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Wed Oct 14 19:49:17 GMT+2 2026

Total time taken to generate the page: 0.00645 seconds