public function moveLocal($targetDir = null, $targetFilename = null)
    {
        // source file
        $sourceFile = $this->getTransport()->getFile();

        // target base name
        $targetBasename = $this->buildTargetBasename($sourceFile, $targetFilename);

        // target path
        if (!$targetDir) {
            $targetDir = $this->getDefaultLocalUploadDirectory();
        }
        $targetPath = $targetDir . '/' . $targetBasename;

        // if target dir not exists - create it
        if (!file_exists($targetDir)) {
            $oldUmast = umask(0);
            mkdir($targetDir, 0777, true);
            umask($oldUmast);
        }

        // move file to target dir
        return $this
            ->getTransport()
            ->moveLocal($targetPath);
    }