Python Check If File Is A Directory