How to use FlySystem for storage in a NextCloud app?

I am developing an app 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:

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 it? I couldn’t really find any documentation about that…