Consider the following scenario:
Note The returned value of the _stat or _wstat function is -1. The error code is "2," which stands for "ENOENT: No such file or directory."
- You have a folder named "folder1" on drive D. For example, you have the following folder: d:\folder1.
- You run the mklink command to create a directory symbolic link to the folder. For example, you run the following command to create a directory symbolic link folder on drive C.
mklink /d c:\linkfolder d:\folder1
- You run a Microsoft Visual C++ 2010 application that is developed by Microsoft Visual Studio 2010 Service Pack 1 (SP1).
- The application calls the _stat or _wstat function, and passes the path of the directory symbolic link "c:\linkfolder" to the path parameter.
Note The returned value of the _stat or _wstat function is -1. The error code is "2," which stands for "ENOENT: No such file or directory."