0

I am developing an app for Nextcloud that needs to read and write files. Part of my code is provided by a library that uses FlySystem. In the NextCloud codebase there is a FlySystem class:

https://github.com/nextcloud/server/blob/master/lib/private/Files/Storage/Flysystem.php

The code says it is a

Generic adapter between flysystem adapters and owncloud’s storage system

That sounds exactly like what I need!

But how do I use that class provided by the Nextcloud codebase? I couldn't really find any documentation about that...

Potherca
  • 13,207
  • 5
  • 76
  • 94
  • Have you visited this [link](https://flysystem.thephpleague.com/v1/docs/) ? – GotExx Oct 23 '20 at 09:46
  • Yes. I know how Flysystem works... What I am not familiar with is NextCloud, how its storage works and how FlySystem ties into it all... – Potherca Oct 23 '20 at 13:18

1 Answers1

1

As it turned out, there wasn't any Flysystem adapter to use the FlySystem API within Nextcloud.

The existing class in /lib/private/Files/Storage/Flysystem.php is meant/used to allow Nextcloud to talk to an external storage location.

In the end, we created our own Adapter to allow working within Nextcloud using the Flysystem API: pdsinterop/flysystem-nextcloud

Potherca
  • 13,207
  • 5
  • 76
  • 94