GDAL

gdalalg_vsi_sync.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "vsi sync" 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#ifndef GDALALG_VSI_SYNC_INCLUDED
14#define GDALALG_VSI_SYNC_INCLUDED
15
16#include "gdalalgorithm.h"
17
19
20/************************************************************************/
21/* GDALVSISyncAlgorithm */
22/************************************************************************/
23
24 class GDALVSISyncAlgorithm final : public GDALAlgorithm
25{
26 public:
27 static constexpr const char *NAME = "sync";
28 static constexpr const char *DESCRIPTION =
29 "Synchronize source and target file/directory located on GDAL Virtual "
30 "System Interface (VSI).";
31 static constexpr const char *HELP_URL = "/programs/gdal_vsi_sync.html";
32
33 GDALVSISyncAlgorithm();
34
35 private:
36 std::string m_source{};
37 std::string m_destination{};
38 bool m_recursive = false;
39 std::string m_strategy = "timestamp";
40 int m_numThreads = 0;
41
42 // Work variables
43 std::string m_numThreadsStr{};
44
45 bool RunImpl(GDALProgressFunc, void *) override;
46};
47
49
50#endif
GDALAlgorithm
GDAL algorithm.
Definition gdalalgorithm_cpp.h:2261