title: Chome Extension, list its directory entries
body: <p>I was trying to develop a chrome extension but I occurred in a problem.</p>
  
  <p>I need to list the entries of a directory inside of the extension itself, but, when I try to implement the <code>chrome.runtime.getPackageDirectoryEntry(function(root) {}</code> the console notifies me with a <strong>chrome.runtime.getPackageDirectoryEntry is not a function</strong>.</p>
  
  <pre><code>function getImage(callback) {
    chrome.runtime.getPackageDirectoryEntry(function(root) {
      root.getDirectory("images", {create: false}, function(localesdir) {
        var reader = localesdir.createReader();
        // Assumes that there are fewer than 100 locales; otherwise see DirectoryReader docs
        reader.readEntries(function(results) {
          callback(results.map(function(de){return de.name;}).sort());
        });
      });
    });
  }
  
  getImages(function(data){console.log(data);});
  </code></pre>
  
  <p>I post the manifest.json too</p>
  
  <pre><code>{
    "name": "My ext",
    "version":"1.1",
    "manifest_version":3,
    "content_scripts": [
      {
        "matches": [
          "*://mysite.dev:*/*"
        ],
        "css": ["content.css"],
        "js": ["content.js"]
      }
    ],
    "web_accessible_resources": ["images/*.png","images/*.gif"]
  }
  </code></pre>
  
  <p>Could anyone help me?</p>