to catch an IOException?
As others have said, just try to do what you want, catch an exception if that happens, and take appropriate action no matter what is in your context.
You really don't have much choice, as I see it, think:
bool iHaveAccess = CheckAccess(folder);
if (iHaveAccess)
{
RenameFolder(folder,newFolderName);
}
What happens if something else locks the folder between CheckAccess and the RenameFolder call? What are you going to do?