DirSource Import file issue
<p>I have been trying to import the file </p>

<pre><code>reuters &lt;- Corpus(DirSource(directory = "E:\\R Programs\\Test\\Reuteurs\\reut2-000.xml", encoding = "UTF-8"), 
   readerControl = list(reader = readReut21578XMLasPlain))
</code></pre>

<p>However I get below error: </p>

<pre><code>Error in DirSource(directory = "E:\\R Programs\\Test\\Reuteurs\\reut2-000.xml",  : 
  empty directory
</code></pre>

<p>I have also checked other solutions provide in stackoverflow but its not working for me. Am I missing anything?</p>

<p><P> But below code works: Why DirSource method is not working for me? Am I missing anything?</p>

<pre><code>reuters &lt;- Corpus(URISource("file://E:\\R Programs\\Test\\Reuteurs\\reut2-000.xml",encoding="UTF-8"), 
   readerControl = list(reader = readReut21578XMLasPlain))
</code></pre>

<p><p>Reference link which I referred: 
<p><a href="https://stackoverflow.com/questions/24643925/r-got-problems-in-reading-text-file">R: Got problems in reading text file</a>
<p><a href="https://stackoverflow.com/questions/20184541/using-r-for-text-mining-reuters-21578">Using R for Text Mining Reuters-21578</a>
<p><a href="https://stackoverflow.com/questions/24138241/r-error-in-trying-to-access-local-data">R Error in trying to access local data</a></p>