Since I couldn’t find a proper documentation and examples for flysystem, I am asking you for help. Currently I am developing a plugin (for Shopware 6), and I am using some sources that are stored inside my plugin (such as pictures, and csv files).
The structure looks like this
|-- custom
|-- plugins
|-- ImporterPlugin
|-- src
|-- Adapter
|-- CsvImportAdapter.php
|-- ImportAdapterInterface.php
|-- Command
|-- ImportCommand.php
|-- Factory
|-- AdapterFactory.php
|-- Resources
|-- Service
|-- ImporterPlugin.php
|-- upload
|-- product.csv
|-- media
|-- Image1.jpg
在.env中,我编写了所需的文件路径
IMPORT_CSV_PATH=/var/www/html/custom/plugins/ImporterPlugin/upload/products.csv
IMPORT_MAP_PATH=/var/www/html/custom/plugins/ImporterPlugin/src/Resources/maps/product.map.json
PRODUCTIMPORTER_MEDIA_SOURCE_PATH=/var/www/html/custom/plugins/ImporterPlugin/upload/media/
我的问题是,如何实现本地适配器(FlySystem)?在哪里调用函数/方法呢?插件的功能主要是在命令行中调用.请举几个例子.谢谢