if(status == -1)
{
/*
*
* Some error occured, should use errno to check
* but for this example... just exit.
*
*/
fprintf(stderr, "stat() failed."
exit(1);
}
This is platform dependent, so your compiler may not provide stat(). If you're on a Windows environment, try GetFileAttributesEx().
Russ
bobbitts@hotmail.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.