Can we recognize which file is executable (i.e. chmod +x) using Mono under Linux? Is there any method in common .Net/Mono base class libraries?
Edit: native Linux executables
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best you can do is use the
Mono.Unix.Nativenamespace to check file permissions, I believe. You can check whether a file has executable permissions (for owner/group/others) by calling theSyscall.Statmethod. More specifically, you’ll want to look into theFilePermissionsenum.