public static function getFolderFromDca($varFolder, \DataContainer $dc = null, $blnDoNotCreate = true)
    {

        // upload folder
        if (is_array($varFolder) && $dc !== null)
        {
            $arrCallback = $varFolder;
            $varFolder   = \System::importStatic($arrCallback[0])->{$arrCallback[1]}($dc);
        }
        elseif (is_callable($varFolder) && $dc !== null)
        {
            $strMethod = $varFolder;
            $varFolder = $strMethod($dc);
        }
        else
        {
            if (strpos($varFolder, '../') !== false)
            {
                throw new \Exception("Invalid target path $varFolder");
            }
        }

        if ($varFolder instanceof \File)
        {
            $varFolder = $varFolder->value;
        }
        else
        {
            if ($varFolder instanceof \FilesModel)
            {
                $varFolder = $varFolder->path;
            }
        }

        if (\Validator::isUuid($varFolder))
        {
            $objFolder = static::getFolderFromUuid($varFolder, $blnDoNotCreate);
            $varFolder = $objFolder->value;
        }

        return $varFolder;
    }