O
O
ObehanProger2019-09-10 18:50:45
Laravel
ObehanProger, 2019-09-10 18:50:45

Does the delete() method delete files in adjacent directories?

Why are the files in the directories next to product_1 lying on the same level, product_2, product_3, etc., being deleted?

$files=Storage::disk('products')->files('tmp/product_1');
if(count($files)>0) Storage::disk('products')->delete($files);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Malyarov, 2019-09-10
@Konstantin18ko

if(count($files)>0) Storage::disk('products/tmp/product_1')->delete($files)

The disk you have is products, and the files are everything below this directory.
Delete deletes files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question