gpt4 book ai didi

Laravel s3 检查目录是否存在。

转载 作者:行者123 更新时间:2023-12-05 00:17:30 24 4
gpt4 key购买 nike

我将如何检查 Laravel storage如果目录存在?

在文档中只记录了如何检查文件是否存在。
Storage::disk('local')->exists('file.jpg');
https://laravel.com/docs/5.3/filesystem#retrieving-files

最佳答案

在 Laravel 5.7 中使用:has()方法用于确定磁盘上是否存在给定文件:

$exists = Storage::disk('s3')->has('file.jpg');

关于Laravel s3 检查目录是否存在。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40217687/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com