首页 > 其他 > 详细

DirectoryExists

时间:2014-05-17 22:24:09      阅读:614      评论:0      收藏:0      [点我收藏+]

 

判断文件夹是否存在

 

关键点

GetFileAttributes

The GetFileAttributes function retrieves attributes for a specified file or directory.

This function retrieves a set of FAT-style attribute information. The GetFileAttributesEx function can obtain other sets of file or directory attribute information.

DWORD GetFileAttributes(

  LPCTSTR lpFileName   // name of file or directory

);

 

实现过程

 

BOOL DirectoryExists(CString DirectoryPath)
{
    if (GetFileAttributes(DirectoryPath) == FILE_ATTRIBUTE_DIRECTORY)
        return TRUE;
    else
        return FALSE;
}

 

 

   


 

备注

 

 

相关链接

                           

 

 




DirectoryExists,布布扣,bubuko.com

DirectoryExists

原文:http://www.cnblogs.com/xe2011/p/3734534.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!