title: Windows API to fetch file attributes if path contains Symbolic link?
body: <p>I used <code>_stat64(const char *path, struct __stat64 *buffer);</code> API to get the file/directory stats but this API fails if  input path contains a symbolic link. </p>
  
  <p><code>GetFileAttributes()</code> and <code>GetFileAttributesEx()</code> APIs too fail if file path contains a symbolic link. But as mentioned at <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365682(v=vs.85).aspx" rel="nofollow">MSDN</a>, If the path points to a symbolic link, these two functions returns attributes for the symbolic link. Even <code>_stat64()</code> works if path points to symbolic link. </p>
  
  <p>Is there any way to get the states/attribues of file/directory if path contains <strong>[not points to]</strong> a symbolic link ? </p>
  
  <p>For instance - how to get attributes of "<em>test</em>" directory if input path is "D:\temp\<strong>symbolic_link</strong>\test"</p>
  
  <p><strong>[Edit1]</strong> 
  Since eryksun's comment made sense. I tried GetFileAttributesEx() and _stat64() again. It worked but this time I had granted the full permissions to target directory and symbolic link both. It appeared to be permission issue. If I pass  "D:\temp\<strong>symbolic_link</strong>" then I get attributes/stats of symbolic link and if I pass "D:\temp\<strong>symbolic_link</strong>\test" then I get attributes/stats of test directory which is expected. </p>