Built-in File Manager (#458)

This commit is contained in:
Saeed Vaziry
2025-02-16 19:56:21 +01:00
committed by GitHub
parent 75e554ad74
commit e2b9d18a71
17 changed files with 907 additions and 29 deletions

View File

@ -1 +1 @@
rm -f {{ $path }}
rm -rf {{ $path }}

View File

@ -0,0 +1,15 @@
@php
$extension = pathinfo($path, PATHINFO_EXTENSION);
@endphp
@if($extension === 'zip')
unzip -o {{ $path }} -d {{ $destination }}
@elseif($extension === 'tar'))
tar -xf {{ $path }} -C {{ $destination }}
@elseif(in_array($extension, ['gz', 'tar.gz']))
tar -xzf {{ $path }} -C {{ $destination }}
@elseif(in_array($extension, ['bz2', 'tar.bz2']))
tar -xjf {{ $path }} -C {{ $destination }}
@else
echo "Unsupported archive format: {{ $extension }}"
@endif