flexist.c
来自「程序涵盖了设计FIR滤器的各种方法」· C语言 代码 · 共 48 行
C
48 行
/*------------ Telecommunications & Signal Processing Lab ------------- McGill UniversityRoutine: int FLexist (const char Fname[])Purpose: Determine if a file existsDescription: This routine determines if a file specified by its filename exists and is a regular file (not a directory or a device).Parameters: <- int FLexist Return value, 1 for an existing regular file, 0 otherwise -> const char Fname[] File nameAuthor / revision: P. Kabal Copyright (C) 1999 $Revision: 1.7 $ $Date: 1999/06/11 23:12:21 $----------------------------------------------------------------------*/static char rcsid[] = "$Id: FLexist.c 1.7 1999/06/11 FilterDesign-v4r0a $";#include <sys/types.h>#include <sys/stat.h>#include <libtsp/nucleus.h>intFLexist (const char Fname[]){ struct stat Fstat; int status; status = stat (Fname, &Fstat); if (status == 0 && (Fstat.st_mode & S_IFMT) == S_IFREG) return 1; else return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?