Can some1 pls answer me if there is any function of how to check if a path exists or not?
That is for example passing a function "/tmp" will show that it exists, however passign it "/gg" will fail if it does not exist....
Thanks
Can some1 pls answer me if there is any function of how to check if a path exists or not?
That is for example passing a function "/tmp" will show that it exists, however passign it "/gg" will fail if it does not exist....
Thanks
See if opendir() fails to open it - for directories
Or maybe fopen() for files.
Or use the fstat() function...
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
sorted it out... thx salem
You may also want to consider access().