add opendir sample