title: WIN32_FIND_DATA returns "." and ".." when listing files in a Directory
body: <p>I'm writing a virtual file system that should work on both Windows and Linux. It's for an assignment so external things like Boost are not allowed. For the Windows version, I'm trying to write a function that mounts all files in a given directory. Here is said function:</p>
  
  <pre><code>void FileSystem::MountDirectory(const std::string directory)
  {
      WIN32_FIND_DATA search_data;
  
      memset(&amp;search_data, 0, sizeof(WIN32_FIND_DATA));
  
      std::wstring wDir = StringToWstring(directory);
      LPCWSTR dir = wDir.c_str();
      HANDLE handle = FindFirstFile(dir, &amp;search_data);
  
      if (handle == INVALID_HANDLE_VALUE)
      {
          std::cout &lt;&lt; "ERROR: Unable to mount files in path: " &lt;&lt; directory &lt;&lt; std::endl;
      }
      else
      {
          while (handle != INVALID_HANDLE_VALUE)
          {
              std::string fileName = WCHARArrayToString(search_data.cFileName);
              File file(fileName, directory);
              m_MountedFiles.push_back(file);
              std::cout &lt;&lt; "Succesfully mounted the file: " &lt;&lt; fileName &lt;&lt; std::endl;
              if (FindNextFile(handle, &amp;search_data) == FALSE)
              {
                  std::cout &lt;&lt; "No more files to mount." &lt;&lt; std::endl;
                  break;
              }
          }
      }
      FindClose(handle);
  }
  </code></pre>
  
  <p>I made some inline functions help with conversion from std::string to std::wstring and vice versa. I make a FileSystem object in my main.cpp and call MountDirectory on the path to a TestFolder on my D: drive: </p>
  
  <blockquote>
    <p>"D:\TestFolder\*.*"</p>
  </blockquote>
  
  <p>So far this code works but in the output for my test folder it always prints this first before the rest of the files:</p>
  
  <blockquote>
    <p>Succesfully mounted the file: .</p>
    
    <p>Succesfully mounted the file: ..</p>
  </blockquote>
  
  <p>Why do those "files" get picked up by the WIN32_FIND_DATA and how do I prevent it?</p>