Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to find if a file is executable permission  RSS feed

 
Rayudu addagarla
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i find if a file is executable.
Say
/usr/bin/firefox
in shell we say if [ -x /usr/bin/firefox ];then

like that how do i find in java code.
File f = new File("/usr/bin/firefox");
if ( f.exists() ) {
{
if ( <need to know file is executable> ) {
}
}

thanks
Rayudu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!