creocoder / yii2-flysystem

The Flysystem integration for the Yii framework.
Other
283 stars 76 forks source link

How to copy folder from remote FS to local? #48

Closed kwazaro closed 3 years ago

kwazaro commented 3 years ago

I have Sftp flysystem remote host. How to copy directory with all files to local machine?

schmunk42 commented 3 years ago

You need to look into https://flysystem.thephpleague.com/v1/docs/advanced/mount-manager/

See also https://github.com/dmstr/yii2-filefly-module/blob/b674ce4e7319c387e8be285ca362fb83b6ed143d/commands/FsController.php#L137-L150 for an implementation example.

kwazaro commented 3 years ago

Mound Manager is deprecated. What should I use now and how to implement copy between two filesystems within this extension? Is it possible to read whole directory to stream and write it locally?

schmunk42 commented 3 years ago

We are only supporting v1 atm, I think you need to ask over here https://github.com/thephpleague/flysystem