LCOV - code coverage report
Current view: top level - apps - gdalalg_vfs.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 8 8 100.0 %
Date: 2025-04-16 00:42:22 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "vfs" 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_vfs_copy.h"
      16             : #include "gdalalg_vfs_delete.h"
      17             : #include "gdalalg_vfs_list.h"
      18             : 
      19             : /************************************************************************/
      20             : /*                           GDALVFSAlgorithm                           */
      21             : /************************************************************************/
      22             : 
      23             : class GDALVFSAlgorithm final : public GDALAlgorithm
      24             : {
      25             :   public:
      26             :     static constexpr const char *NAME = "vfs";
      27             :     static constexpr const char *DESCRIPTION =
      28             :         "GDAL Virtual file system (VSI) commands.";
      29             :     static constexpr const char *HELP_URL = "/programs/gdal_vfs.html";
      30             : 
      31          40 :     GDALVFSAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      32             :     {
      33          40 :         RegisterSubAlgorithm<GDALVFSCopyAlgorithm>();
      34          40 :         RegisterSubAlgorithm<GDALVFSDeleteAlgorithm>();
      35          40 :         RegisterSubAlgorithm<GDALVFSListAlgorithm>();
      36          40 :     }
      37             : 
      38             :   private:
      39           1 :     bool RunImpl(GDALProgressFunc, void *) override
      40             :     {
      41           1 :         CPLError(CE_Failure, CPLE_AppDefined,
      42             :                  "The Run() method should not be called directly on the \"gdal "
      43             :                  "vfs\" program.");
      44           1 :         return false;
      45             :     }
      46             : };
      47             : 
      48             : GDAL_STATIC_REGISTER_ALG(GDALVFSAlgorithm);

Generated by: LCOV version 1.14