What is the best way to check if a file exists, if not create it and write info by using mac
library <.mach-o/dyld.h> or other..?
What is the best way to check if a file exists, if not create
Share
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.
Your question is unclear.
Checking if a file exists is trivial – use
stat()oraccess(), e.g.:Creating a file is similarly trivially – use
open()orfopen(). Find any good book on C programming, this is the most fundamental thing most any book will teach.But what has
<mach-o/dyld.h>got to do with it?