in reply to opendir or not?

Unless i read that wrong, then its not quite as portable. Eg. might not work for win or platform X that doensn't use "/" as path separator. Also consider filename 'my_file/with funky sep'.