File: DefaultedFileSystemAccess.h

package info (click to toggle)
megacmd 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 32,592 kB
  • sloc: cpp: 326,437; ansic: 34,524; python: 4,630; java: 3,965; sh: 2,869; objc: 2,459; makefile: 197; xml: 113
file content (107 lines) | stat: -rw-r--r-- 2,938 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
 * (c) 2019 by Mega Limited, Wellsford, New Zealand
 *
 * This file is part of the MEGA SDK - Client Access Engine.
 *
 * Applications using the MEGA API must present a valid application key
 * and comply with the the rules set forth in the Terms of Service.
 *
 * The MEGA SDK is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright Simplified (2-clause) BSD License.
 *
 * You should have received a copy of the license along with this
 * program.
 */

#pragma once

#include <mega/filesystem.h>
#include <megaapi.h>

#include "NotImplemented.h"

namespace mt {

class DefaultedFileSystemAccess: public mega::FileSystemAccess
{
public:
    using FileSystemAccess::getlocalfstype;

    bool issyncsupported(const mega::LocalPath&,
                         bool& b,
                         mega::SyncError& se,
                         mega::SyncWarning& sw) override
    {
        b = false;
        se = mega::NO_SYNC_ERROR;
        sw = mega::NO_SYNC_WARNING;
        return true;
    }

    DefaultedFileSystemAccess() {}

    std::unique_ptr<mega::FileAccess> newfileaccess(bool /*followSymLinks*/ = true) override
    {
        throw NotImplemented{__func__};
    }
    std::unique_ptr<mega::DirAccess> newdiraccess() override
    {
        throw NotImplemented{__func__};
    }
    bool getlocalfstype(const mega::LocalPath&, mega::FileSystemType& type) const override
    {
        return type = mega::FS_UNKNOWN, false;
    }
    bool getsname(const mega::LocalPath&, mega::LocalPath&) const override
    {
        throw NotImplemented{__func__};
    }
    bool renamelocal(const mega::LocalPath&, const mega::LocalPath&, bool = true) override
    {
        throw NotImplemented{__func__};
    }
    bool copylocal(const mega::LocalPath&, const mega::LocalPath&, mega::m_time_t) override
    {
        throw NotImplemented{__func__};
    }
    bool unlinklocal(const mega::LocalPath&) override
    {
        throw NotImplemented{__func__};
    }
    bool rmdirlocal(const mega::LocalPath&) override
    {
        throw NotImplemented{__func__};
    }
    bool mkdirlocal(const mega::LocalPath&, bool, bool) override
    {
        throw NotImplemented{__func__};
    }
    bool setmtimelocal(const mega::LocalPath&, mega::m_time_t) override
    {
        throw NotImplemented{__func__};
    }
    bool chdirlocal(mega::LocalPath&) const override
    {
        throw NotImplemented{__func__};
    }

    bool expanselocalpath(const mega::LocalPath& /*path*/,
                          mega::LocalPath& /*absolutepath*/) override
    {
        throw NotImplemented{__func__};
    }
    void addevents(mega::Waiter*, int) override
    {
        throw NotImplemented{__func__};
    }

    bool cwd(mega::LocalPath&) const override
    {
        throw NotImplemented{__func__};
    }
};

} // mt