Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
deleteTemporaryBackupDirectory example
try
{
$result
=
$this
->
deleteCacheDirectories
(
0
)
;
if
(
!
$result
->
getIsReady
(
)
&&
$this
->useTimer
)
{
return
json_encode
(
[
'deletedFiles' =>
$result
->
getFileCount
(
)
,
'ready' =>
$result
->
getIsReady
(
)
,
'error' => false,
]
)
;
}
$result
=
$this
->
deleteTemporaryBackupDirectory
(
$result
->
getFileCount
(
)
)
;
if
(
$this
->useTimer
)
{
return
json_encode
(
[
'deletedFiles' =>
$result
->
getFileCount
(
)
,
'ready' =>
$result
->
getIsReady
(
)
,
'error' => false,
]
)
;
}
}
catch
(
Exception
$exception
)
{
if
(
$this
->useTimer
)
{
return
json_encode
(
[
'deletedFiles' => 0,