f_isdir.c
来自「[随书类]Dos6.0源代码」· C语言 代码 · 共 33 行
C
33 行
/***************************************************************************/
/* */
/* F_ISDIR.C */
/* */
/* Copyright (c) 1991 - Microsoft Corp. */
/* All rights reserved. */
/* Microsoft Confidential */
/* */
/* Determines if any files exist in the specified directory path. */
/* */
/* int IsDirEmpty( char *szPath ) */
/* */
/* ARGUMENTS: szPath - Ptr to full path name for directory to search */
/* RETURNS: int - FALSE if file is found else TRUE */
/* */
/* Created 10-28-89 johnhe */
/***************************************************************************/
#include <stdio.h>
#include <alias.h>
#include <strlib.h>
#include <disk_io.h>
int IsDirEmpty( char *szPath )
{
char *szAnyFile = "????????.???";
char szFullPath[ MAX_PATH_LEN ];
BuildPath( szFullPath, szPath[0], szPath + 2, szAnyFile );
return( !FileExists( szFullPath ) );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?