Laravel, unable to copyDirectory or moveDirectory

前端 未结 2 731
不知归路
不知归路 2021-01-16 12:33

Currently I having problem with Laravel cannot use moveDirectory and copyDirectory however makeDirectory or deleteDirectory works fine, the code as follow:

&         


        
2条回答
  •  死守一世寂寞
    2021-01-16 13:27

    Use the File::copyDirectory() method.

    $success = File::copyDirectory($sourceDir, $destinationDir);

    The method will return true if all files and subdirectories are successfully copied.

    If the destination directory doesn't exist it will be created. It will be created recursively as needed.

提交回复
热议问题