create opendir, nextfiledir and closedir ops.