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
Printable View
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...
sorted it out... thx salem
You may also want to consider access().