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

Home » U++ Library support » U++ Core » FindFile::IsExecutable() [Feature request]
FindFile::IsExecutable() [Feature request] [message #25685] Sun, 07 March 2010 21:51 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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
 
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: Tue Sep 15 15:24:12 GMT+2 2026

Total time taken to generate the page: 0.00757 seconds