Search code examples
c++c

how can i check file write permissions in C++ code?


In my C++ program, I want to make sure i can write info to a file. How can I perform this check?


Solution

  • You use the stat() system call, which the purists will tell you doesn't exist unless you change the tags on your question.