protected static function deleteHostedAppStorage($id, $storageServiceId, $storageFolder)
    {
        $app = AppModel::whereId($id)->first();

        if (empty($app) && !empty($storageServiceId) && !empty($storageFolder)) {
            /** @type FileServiceInterface $storageService */
            $storageService = ServiceManager::getServiceById($storageServiceId);

            if ($storageService->folderExists($storageFolder)) {
                $storageService->deleteFolder($storageFolder, true);
            }
        }
    }
protected static function deleteHostedAppStorage($id, $storageServiceId, $storageFolder)
    {
        $app = AppModel::whereId($id)->first();

        if (empty($app) && !empty($storageServiceId) && !empty($storageFolder)) {
            /** @type FileServiceInterface $storageService */
            $storageService = ServiceManager::getServiceById($storageServiceId);

            if ($storageService->folderExists($storageFolder)) {
                $storageService->deleteFolder($storageFolder, true);
            }
        }
    }
protected static function deleteHostedAppStorage ( $ id , $ storageServiceId , $ storageFolder ) { $ app = AppModel :: whereId ( $ id ) -> first ( ) ; if ( empty ( $ app ) && ! empty ( $ storageServiceId ) && ! empty ( $ storageFolder ) ) { /** @type FileServiceInterface $storageService */ $ storageService = ServiceManager :: getServiceById ( $ storageServiceId ) ; if ( $ storageService -> folderExists ( $ storageFolder ) ) { $ storageService -> deleteFolder ( $ storageFolder , true ) ; } } }
Deletes hosted app files from storage.

@param $id
@param $storageServiceId
@param $storageFolder
@throws \DreamFactory\Core\Exceptions\NotFoundException
Deletes hosted app files from storage .