title: How to get the number of lines in a text file without opening it?
body: <p>I'm developing this code that, after the user selects a directory, it display a table of the files contained in that location with their details (name, type, size ...).</p>
  
  <p>A directory may contain a lot of files.</p>
  
  <p>I succeeded to achieve that. But, my problem is that I want to display the number of lines in each file. I can get the number of lines using this <code>JavaScript</code> code : </p>
  
  <pre><code>var reader = new FileReader();
  var textFile = $("#file").get(0).files[0];
  reader.readAsText(textFile);
  $(reader).on('load', processFile);
  /*And in processFile() i use this line to get the number of lines :*/
  nbLines = (file.split("\n")).length;
  </code></pre>
  
  <p>The above code work as expected and it give me what I want, but it may a heavy process if there is so many files in the selected directory!</p>
  
  <p><strong>The Question :</strong> Is there a way to get the number of lines in a text file without reading it?</p>
  
  <p>Regards!</p>