you can't, you'll need to copy them (as you are now) and then delete the old versions (this is how cut / paste works as well so it's not really any different)
Jul 31, 2018
3
Level 4
How to cut all the file from a directory from sftp server to local server using file system?
I have a server used to store exchange file.
/uploads/a.txt
/uploads/b.txt
....so on
I am using this to get all of the file inside /uploads/ dir.
$list = Storage::disk('sftp')->allfiles();
After that, i use foreach to loop every file based on directory to my local.
Storage::disk('save')->put($old,$new);
Right now i only able to save the file to local without cleaning the /uploads/ dir, and not sure is this practical way to do it. Can i know how can i cut all the file from the sftp /uploads/ dir and store to my local?
Please or to participate in this conversation.