# getEntryWithUrl not accepting valid path

**URL:** <https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [February 25, 2023, 10:33pm UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927 "2023-02-25T22:33:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [February 25, 2023, 10:33pm UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/1 "2023-02-25T22:33:13Z")

</div>

I’m trying out the new `getEntryWithUrl()` method and I’m not having much luck. I’ve included `fs.readdir()` to test the path is working. `readdir` returns the folder contents fine, but `getEntryWithUrl` throws its toys out of the pram with the same path. I also included the example from the documentation for accessing the plugin data folder and it returns the same error.  
Anyone got this to work yet that can provide some pointers? Or alternatively, is `getEntryWithUrl` pre-release?

PS: 24.2.0  
API: 2  
Manifest: 5 (`fullAccess` granted)

```auto
 const { app } = require("photoshop");
 const fs = require("fs");
 const fsp = require("uxp").storage.FileSystemProvider;

 // Get path to activeDocument folder
 const doc = app.activeDocument;
 const path = doc.path.slice(0, doc.path.lastIndexOf("\\"));

 console.log("paths", path);

 // Read contents of activeDocument folder
 const readPathFolder = await fs.readdir(`file:/${path}`);

 console.log("folders", readPathFolder);

 // Get entry with url ???
 const dataFolder = await fsp.getEntryWithUrl(`plugin-data:/`);
 const pathFolder = await fsp.getEntryWithUrl(`file:/${path}`);

 console.log("entries", { dataFolder, pathFolder });

```

 ![x](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/2/2497b34c454f1bed6befe1debc44e10c5c2f8205.png)

---

<div class="post-metadata">

**Author:** ![sttk3](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sttk3](https://forums.creativeclouddeveloper.com/u/sttk3)\
**Post date:** [February 25, 2023, 11:20pm UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/2 "2023-02-25T23:20:28Z")

</div>

Do not require FileSystemProvider directly, but require its instance, localFileSystem.

```auto
const fsp = require("uxp").storage.localFileSystem;

```

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [February 26, 2023, 12:33am UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/3 "2023-02-26T00:33:25Z")

</div>

> [@sttk3](#):
>
> `const fsp = require("uxp").storage.localFileSystem;`

@sttk3 you beauty, thank you!

---

<div class="post-metadata">

**Author:** ![MalbertCunha](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/malbertcunha/32/2760_2.png) [@MalbertCunha](https://forums.creativeclouddeveloper.com/u/MalbertCunha)\
**Post date:** [February 27, 2023, 3:32pm UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/4 "2023-02-27T15:32:52Z")

</div>

@Timothy_Bennett please could you check that my manifest passes all the requirements to use getEntryWithUrl(), I am not succeeding in my attempts. Thanks.

```auto
{
  "id": "UXP-TESTES",
  "name": "UXP-testes",
  "version": "1.0.0",
  "host": [
    {
      "app": "PS",
      "minVersion": "24.2.0"
    }
  ],
	"requiredPermissions": {
	"localFileSystem": "fullAccess"
	}
  ,
  "main": "index.html",
  "manifestVersion": 5,
  "requiredPermissions": {
    "network": {
      "domains": [
        "https://source.unsplash.com"
      ]
    },
    "clipboard": "readAndWrite",
    "localFileSystem": "request",
    "ipc": {
      "enablePluginCommunication": true
    }
  },
  "entrypoints": [
    {
      "type": "panel",
      "id": "vanilla",
      "label": {
        "default": "UXP-testes",
        "en-US": "UXP-testes",
        "es-ES": "UXP-testes"
      },
      "minimumSize": {
        "width": 160,
        "height": 350
      },
      "maximumSize": {
        "width": 160,
        "height": 350
      },
      "preferredDockedSize": {
        "width": 160,
        "height": 350
      },
      "preferredFloatingSize": {
        "width": 160,
        "height": 350
      },
      "commands": [
        {
          "id": "show_alert",
          "label": {
            "default": "Show Alert",
            "en-US": "Show Alert (US)",
            "es-ES": "Show Alert (ES)"
          }
        }
      ],
      "icons": [
        {
          "width": 32,
          "height": 32,
           "path": "icons/light.png",
          "scale": [1,2],
          "theme": [ "dark", "darkest"
          ],
          "species": [
            "generic"
          ]
        },
        {
          "width": 32,
          "height": 32,
          "path": "icons/dark.png",
           "scale": [
            1,
            2
          ],
          "theme": ["lightest", "light"],
          "species": [
            "generic"
          ]
        }
      ]
    }
  ],
  "icons": [
    {
      "width": 32,
      "height": 32,
      "path": "icons/icon_D.png",
      "scale": [
        1,
        2
      ],
      "theme": [
        "dark",
        "darkest"
      ],
      "species": [
        "generic"
      ]
    },
    {
      "width": 32,
      "height": 32,
      "path": "icons/icon_N.png",
      "scale": [
        1,
        2
      ],
      "theme": [
        "lightest",
        "light"
      ],
      "species": [
        "generic"
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [February 27, 2023, 3:43pm UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/5 "2023-02-27T15:43:01Z")

</div>

You’ve added your local `required permissions` field under `host`, you just need to delete that and add `localFileSystem: "full Access"` to the existing `required permissions` field at the top level of the manifest Object:

 ![IMG_20230227_153636](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/d/d937eb7ba64ca5cc539c42a92eaf4e2f95b24481.jpeg)

---

<div class="post-metadata">

**Author:** ![MalbertCunha](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/malbertcunha/32/2760_2.png) [@MalbertCunha](https://forums.creativeclouddeveloper.com/u/MalbertCunha)\
**Post date:** [March 3, 2023, 4:38am UTC](https://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927/6 "2023-03-03T04:38:52Z")

</div>

Thanks @Timothy_Bennett
