<p dir="auto">I've a input element like <code class="notranslate">&lt;input type="file" webkitdirectory="" multiple="" name="files[]" id="files""&gt;</code> which prompts a user to select a folder. I need to get file names &amp; paths of all the files within that folder.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var input = document.getElementById('files');
input.onchange = function(e) {
    var files = e.target.files; // File list
    for (var i = 0; i &lt; files.length; ++i) {
      
      var fpath = files[i].webkitRelativePath;
      var ftype = files[i].type;
      var fsize = files[i].size;
      
      console.log(fname)
      }
    }"><pre class="notranslate"><code class="notranslate">var input = document.getElementById('files');
input.onchange = function(e) {
    var files = e.target.files; // File list
    for (var i = 0; i &lt; files.length; ++i) {
      
      var fpath = files[i].webkitRelativePath;
      var ftype = files[i].type;
      var fsize = files[i].size;
      
      console.log(fname)
      }
    }
</code></pre></div>
<p dir="auto">This works perfectly fine when run from chrome web browser as shown here: <a href="https://jsfiddle.net/7prshjfz/" rel="nofollow">https://jsfiddle.net/7prshjfz/</a>. However, when I try to run the same app via electron it gives ONLY the folder name and nothing else. When I tried to debug further, I released that when a folder is selected, only the folder name, size, modified etc details are available.</p>
<p dir="auto">Therefore, clearly there is a different implementation of <code class="notranslate">webkitdirectory</code> in electron.  Is this an intended implementation?</p>
<p dir="auto"><strong>My Problem:</strong> I know I can use the <code class="notranslate">dialog.showOpenDialog</code> and read the <code class="notranslate">fs</code> using the directory path. But, I find this to be a bad solution for my case (or perhaps for anyone) because, I want my code to be minimal for the sake of the web app. I want to reuse as much of the functionality from the webapp with additional implementation in Electron and NodeJS. I would be grateful to know if there is any special implementation of webkitdirectory that works BOTH in an Internet Browser and Electron app with minimal modifications, for instance, to the above displayed code/ jsFiddle.</p>
<p dir="auto">I'm not sure If  I this is a missing feature/ bug or neither. Any feedback will be appreciated :)</p>
<p dir="auto"> file . multiple webkitdirectory in chrome can get sub files.but atom-shell can select directory,sub file set only current directory? is bug?</p>