delphi的我知道,vc用哪个api?

解决方案 »

  1.   

    if( (_access( path, 0 )) != -1 )
    {
       //path exist.
    }You also can use _chdir() function. You can get the detail of this two function in MSDN
      

  2.   

    CFileFind ff;
    BOOL bFind =ff.FindFile("c:\\yourdirctory", 0);
      

  3.   

    BOOL PathFileExists(
        LPCTSTR pszPath
        );
      

  4.   

    yesBOOL PathFileExists(LPCTSTR lpszPath);可判断文件或目录是否存在
      

  5.   

    // 判断目录是否存在;
    if(_access(strPathName,0)==-1)
    {
    // 如果不存在就建立一个目录
    if(CreateDirectory(strPathName,NULL)==0)
    {
    AfxMessageBox("无法创建目录!",MB_OK);
    return ;
    }
    }