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
49
50
|
#pragma once
#include "OpBase.h"
#include "./Utils/Enumer.h"
#include "./Utils/IOBuffer.h"
#include "../UI/Defs.h"
#include "../BackgroundTasks.h"
class OpXfer : protected OpBase, public IBackgroundTask
{
Path2FileInformation _entries;
std::shared_ptr<Enumer> _enumer;
std::shared_ptr<IHost> _dst_host;
std::string _dst_dir, _diffname_suffix;
XferOverwriteAction _default_xoa = XOA_ASK;
XferKind _kind;
XferDirection _direction;
IOBuffer _io_buf;
bool _smart_symlinks_copy;
bool _umask_override;
bool _on_site_move = false;
virtual void Process();
virtual void ForcefullyAbort(); // IAbortableOperationsHost
bool IsDstPathExists(const std::string &path);
void Rename(const std::set<std::string> &items);
void EnsureDstDirExists();
void Transfer();
void DirectoryCopy(const std::string &path_dst, const FileInformation &info);
bool SymlinkCopy(const std::string &path_src, const std::string &path_dst);
bool FileCopyLoop(const std::string &path_src, const std::string &path_dst, FileInformation &info);
void EnsureProgressConsistency();
void CopyAttributes(const std::string &path_dst, const FileInformation &info);
public:
OpXfer(int op_mode, std::shared_ptr<IHost> &base_host, const std::string &base_dir,
std::shared_ptr<IHost> &dst_host, const std::string &dst_dir, struct PluginPanelItem *items,
int items_count, XferKind kind, XferDirection direction);
virtual ~OpXfer();
virtual BackgroundTaskStatus GetStatus();
virtual std::string GetInformation();
virtual std::string GetDestination(bool &directory);
virtual void Show();
virtual void Abort();
};
|