Airship\Cabin\Bridge\Landing\Proto\FileManager::commonConfirmDeleteFile PHP Method

commonConfirmDeleteFile() protected method

Confirm file deletion
protected commonConfirmDeleteFile ( string $file, string $path, string $cabin )
$file string
$path string
$cabin string
    protected function commonConfirmDeleteFile(string $file, string $path, string $cabin)
    {
        if (!$this->permCheck()) {
            \Airship\redirect($this->airship_cabin_prefix);
        }
        list($publicPath, $root) = $this->loadCommonData($path, $cabin);
        if (empty($root)) {
            $fileInfo = $this->files->getFileInfo($cabin, null, $file);
        } else {
            $fileInfo = $this->files->getFileInfo($cabin, $root, $file);
        }
        $post = $this->post();
        if (!empty($post)) {
            $this->files->deleteFile($fileInfo);
            \Airship\redirect($this->airship_cabin_prefix . '/' . $this->path_middle . '/' . $cabin, ['dir' => $path]);
        }
        $this->lens('files/delete', ['cabins' => $this->getCabinNamespaces(), 'file' => $fileInfo, 'root_dir' => $this->root_dir, 'dir' => $this->root_dir . '/' . $path, 'cabin' => $cabin, 'pathinfo' => $publicPath]);
    }