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

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "vfs delete" subcommand
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Deleteright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_VFS_DELETE_INCLUDED
      14             : #define GDALALG_VFS_DELETE_INCLUDED
      15             : 
      16             : #include "gdalalgorithm.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                        GDALVFSDeleteAlgorithm                        */
      22             : /************************************************************************/
      23             : 
      24             : class GDALVFSDeleteAlgorithm final : public GDALAlgorithm
      25             : {
      26             :   public:
      27             :     static constexpr const char *NAME = "delete";
      28             :     static constexpr const char *DESCRIPTION =
      29             :         "Delete files located on GDAL Virtual file systems (VSI).";
      30             :     static constexpr const char *HELP_URL = "/programs/gdal_vfs_delete.html";
      31             : 
      32          40 :     static std::vector<std::string> GetAliasesStatic()
      33             :     {
      34         160 :         return {"rm", "rmdir", "del"};
      35             :     }
      36             : 
      37             :     GDALVFSDeleteAlgorithm();
      38             : 
      39             :   private:
      40             :     std::string m_filename{};
      41             :     bool m_recursive = false;
      42             : 
      43             :     bool RunImpl(GDALProgressFunc, void *) override;
      44             : };
      45             : 
      46             : //! @endcond
      47             : 
      48             : #endif

Generated by: LCOV version 1.14