public static function mkdir(string $path, $chmod = null): void
    {
        if (!is_dir($path)) {
            if ($chmod === null) {
                $chmod = Application::getConfig('application')->getArrayItem('filesystem', 'default_chmod', 0644);
            }

            if (!mkdir($path, $chmod, true)) {
                throw new FilesystemException("Can not create directory on path={$path}");
            }
        }
    }