/* * This file is part of NetSurf, http://netsurf.sourceforge.net/ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license * Copyright 2004 James Bursa * Copyright 2003 Phil Mellor * Copyright 2003 John M Bell * Copyright 2004 John Tytgat */ #include #include #include #include #include #include "nstheme/utils/utils.h" /** * Check if a directory exists. */ bool is_dir(const char *path) { struct stat s; if (stat(path, &s)) return false; return S_ISDIR(s.st_mode) ? true : false; }