I'm using C and sometimes I have to handle paths like
Is there a way to check if a given path is a directory or a given path is a file?
Call GetFileAttributes, and check for the FILE_ATTRIBUTE_DIRECTORY attribute.