public static function inst()
    {
        if (!self::$instance) {
            self::$instance = new static();

            $dmsPath = self::$instance->getStoragePath();

            if (!is_dir($dmsPath)) {
                self::$instance->createStorageFolder($dmsPath);
            }

            if (!file_exists($dmsPath . DIRECTORY_SEPARATOR . '.htaccess')) {
                // Restrict access to the storage folder
                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . '.htaccess',
                    $dmsPath . DIRECTORY_SEPARATOR . '.htaccess'
                );

                copy(
                    BASE_PATH . DIRECTORY_SEPARATOR . DMS_DIR . DIRECTORY_SEPARATOR
                    . 'resources' . DIRECTORY_SEPARATOR . 'web.config',
                    $dmsPath . DIRECTORY_SEPARATOR . 'web.config'
                );
            }
        }
        return self::$instance;
    }