/tmp file duration program questions. Answer.

A JETSON News User cosc6bp at elroy.uh.edu
Thu Feb 8 02:23:03 AEST 1990


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



More information about the Comp.lang.c mailing list