LCOV - code coverage report
Current view: top level - apps - gdalalg_vsi.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 11 11 100.0 %
Date: 2025-05-15 13:16:46 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "vsi" subcommand
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "gdalalgorithm.h"
      14             : 
      15             : #include "gdalalg_vsi_copy.h"
      16             : #include "gdalalg_vsi_delete.h"
      17             : #include "gdalalg_vsi_list.h"
      18             : #include "gdalalg_vsi_move.h"
      19             : #include "gdalalg_vsi_sync.h"
      20             : #include "gdalalg_vsi_sozip.h"
      21             : 
      22             : /************************************************************************/
      23             : /*                           GDALVSIAlgorithm                           */
      24             : /************************************************************************/
      25             : 
      26             : class GDALVSIAlgorithm final : public GDALAlgorithm
      27             : {
      28             :   public:
      29             :     static constexpr const char *NAME = "vsi";
      30             :     static constexpr const char *DESCRIPTION =
      31             :         "GDAL Virtual System Interface (VSI) commands.";
      32             :     static constexpr const char *HELP_URL = "/programs/gdal_vsi.html";
      33             : 
      34          85 :     GDALVSIAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      35             :     {
      36          85 :         RegisterSubAlgorithm<GDALVSICopyAlgorithm>();
      37          85 :         RegisterSubAlgorithm<GDALVSIDeleteAlgorithm>();
      38          85 :         RegisterSubAlgorithm<GDALVSIListAlgorithm>();
      39          85 :         RegisterSubAlgorithm<GDALVSIMoveAlgorithm>();
      40          85 :         RegisterSubAlgorithm<GDALVSISyncAlgorithm>();
      41          85 :         RegisterSubAlgorithm<GDALVSISOZIPAlgorithm>();
      42          85 :     }
      43             : 
      44             :   private:
      45           1 :     bool RunImpl(GDALProgressFunc, void *) override
      46             :     {
      47           1 :         CPLError(CE_Failure, CPLE_AppDefined,
      48             :                  "The Run() method should not be called directly on the \"gdal "
      49             :                  "vsi\" program.");
      50           1 :         return false;
      51             :     }
      52             : };
      53             : 
      54             : GDAL_STATIC_REGISTER_ALG(GDALVSIAlgorithm);

Generated by: LCOV version 1.14