--- Frodo4/Src/main_x.h 2004/01/13 19:52:49 1.5 +++ Frodo4/Src/main_x.h 2004/01/14 17:24:19 1.6 @@ -119,3 +119,14 @@ Prefs *Frodo::reload_prefs(void) newprefs.Load(prefs_path); return &newprefs; } + + +/* + * Determine whether path name refers to a directory + */ + +bool IsDirectory(const char *path) +{ + struct stat st; + return stat(path, &st) == 0 && S_ISDIR(st.st_mode); +}