I apologize for my bad English.
Different files can has different permissions. For example I can have not permission for a file read/write, but this file is exists. How can I check existence of the such file via C89?
Thank you.
Best Regards
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.
If you stick to C89, there’s no universal way of checking for file existence.
There are some standard functions outside of C89, POSIX functions:
stat()
fstat()
At any rate, it depends on the OS since the language itself does not provide such functionality.