forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgdalalg_vfs.cpp
48 lines (41 loc) · 1.61 KB
/
gdalalg_vfs.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/******************************************************************************
*
* Project: GDAL
* Purpose: gdal "vfs" subcommand
* Author: Even Rouault <even dot rouault at spatialys.com>
*
******************************************************************************
* Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
*
* SPDX-License-Identifier: MIT
****************************************************************************/
#include "gdalalgorithm.h"
#include "gdalalg_vfs_copy.h"
#include "gdalalg_vfs_delete.h"
#include "gdalalg_vfs_list.h"
/************************************************************************/
/* GDALVFSAlgorithm */
/************************************************************************/
class GDALVFSAlgorithm final : public GDALAlgorithm
{
public:
static constexpr const char *NAME = "vfs";
static constexpr const char *DESCRIPTION =
"GDAL Virtual file system (VSI) commands.";
static constexpr const char *HELP_URL = "/programs/gdal_vfs.html";
GDALVFSAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
{
RegisterSubAlgorithm<GDALVFSCopyAlgorithm>();
RegisterSubAlgorithm<GDALVFSDeleteAlgorithm>();
RegisterSubAlgorithm<GDALVFSListAlgorithm>();
}
private:
bool RunImpl(GDALProgressFunc, void *) override
{
CPLError(CE_Failure, CPLE_AppDefined,
"The Run() method should not be called directly on the \"gdal "
"vfs\" program.");
return false;
}
};
GDAL_STATIC_REGISTER_ALG(GDALVFSAlgorithm);