/* * File type testing routine. * $Id$ * Copyright (c) 1997 by Tycho Softworks. * For conditions of distribution and reuse see product license. */ #include bool isftype(const char *path, int ftype) { struct stat ino; if(stat(path, &ino)) return FALSE; if((ino.st_mode & S_IFMT) == ftype) return TRUE; return FALSE; }