[comp.lang.c] /tmp file duration program questions. Answer.

cosc6bp@elroy.uh.edu (A JETSON News User) (02/07/90)

Thanks to all who replied to my questions, they where all helpful and 
informative.  From an offline note, the winner of getting the directory
information from /tmp using C is:

        #include <sys/types.h>
	#include <dirent.h>
	DIR *dp;  struct dirent *de;
	dp = opendir("/tmp");
	while ((de = readdir(dp)) != NULL) dosomething(de->d_name);
	closedir(dp);

Nice stuff. 

Ignacio Valdes