Salve ragazzi, ho un quesito irrisolto. In C, come posso fare a sapere se un file è, appunto, un file o una directory?

Grazie mille!