# PrefixFilesystem für Plugin-Scope nicht verfügbar

**URL:** <https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718>\
**Category:** Programmierung\
**Created:** [29. Juli 2019 um 13:17 UTC](https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718 "2019-07-29T13:17:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeichDatensysteme](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@TeichDatensysteme](https://forum.shopware.com/u/TeichDatensysteme)\
**Post date:** [29. Juli 2019 um 13:17 UTC](https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718/1 "2019-07-29T13:17:26Z")

</div>

Hallo!

Ich würde gerne wie in Shopware 5.5 das Filesystem verwenden, um zum einen privat als auch public Dateien- und Ordner zu verwalten.  
Bei Shopware 5.5 konnte man den Service so holen:

```
/** @var \Shopware\Components\Filesystem\PrefixFilesystem $fileSystem */
$fileSystemPrivate = $this->container->get('foo_bar.filesystem.private');

```

Das geht leider nicht in Shopware 6.

```
You have requested a non-existent service "foo_bar.filesystem.private".

```

Gibt es Alternativen, wie man das erreichen kann?  
Die Klasse gibt es ja jedenfalls …&nbsp;[https://github.com/shopware/platform/blob/master/src/Core/Framework/Filesystem/PrefixFilesystem.php](https://github.com/shopware/platform/blob/master/src/Core/Framework/Filesystem/PrefixFilesystem.php)

Wenn ich den von Shopware in der install() verwenden möchte (als Beispiel), kracht es:

```
The "shopware.filesystem.private" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.

```

Schöne Grüße,  
Niklas

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [29. Juli 2019 um 15:36 UTC](https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718/2 "2019-07-29T15:36:28Z")

</div>

Der Filesystem Service ist private. Deshalb knallt es da. Du musst ihn also injecten in irgendein Service

---

<div class="post-metadata">

**Author:** ![TeichDatensysteme](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@TeichDatensysteme](https://forum.shopware.com/u/TeichDatensysteme)\
**Post date:** [29. Juli 2019 um 16:35 UTC](https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718/3 "2019-07-29T16:35:44Z")

</div>

Ah. Den eigenen Service kann ich aber ja nicht in der install holen, weil dieser (noch) nicht zur Verfügung steht.  
Bedeutet, dass das so nicht machbar wäre …&nbsp; ![Undecided](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/undecided.png "Undecided")

---

<div class="post-metadata">

**Author:** ![experthing](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@experthing](https://forum.shopware.com/u/experthing)\
**Post date:** [24. September 2020 um 09:38 UTC](https://forum.shopware.com/t/prefixfilesystem-fur-plugin-scope-nicht-verfugbar/60718/4 "2020-09-24T09:38:26Z")

</div>

@TeichDatensysteme‍ Konntet Ihr das Problem Lösen? Wenn ja, wie?

&nbsp;

Grüße, Michael
