-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathccdirectory.cc
87 lines (71 loc) · 1.79 KB
/
ccdirectory.cc
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
#include "ccdirectory.h"
#include <assert.h>
CC_directory_strategy* CC_Directory::instance = nullptr;
CC_Directory::CC_Directory()
{
if (instance == nullptr)
{
instance = CC_directory_strategy::GetInstance();
}
assert(instance != nullptr);
}
CC_Directory::~CC_Directory()
{
if (instance == nullptr)
{
delete instance;
instance = nullptr;
}
}
void CC_Directory::CreateDirectory(std::string path)
{
instance->CreateDirectory(path);
}
void CC_Directory::RemoveDirectory(std::string path)
{
instance->RemoveDirectory(path);
}
std::vector<std::string>CC_Directory::GetSubDirectoryCollection(std::string path)
{
return instance->GetSubDirectoriesCollection(path);
}
std::vector<std::string>CC_Directory::GetFiles(std::string path)
{
return instance->GetFiles(path);
}
std::vector<std::string>CC_Directory::GetFilesAndDirectories(std::string path)
{
return instance->GetFilesAndDirectories(path);
}
bool CC_Directory::Exists(std::string path)
{
return instance->Exists(path);
}
std::string CC_Directory::GetCurrentDirectory()
{
return instance->GetCurrentDirectory();
}
std::string CC_Directory::GetDirectoryRoot(std::string path)
{
return instance->GetDirectoryRoot(path);
}
std::string CC_Directory::GetParentDirectory(std::string path)
{
return instance->GetParentDirectory(path);
}
void CC_Directory::MoveDirectory(std::string sourcePath, std::string destPath)
{
instance->MoveDirectory(sourcePath, destPath);
}
void CC_Directory::CopyDirectory(std::string sourcePath, std::string destPath)
{
instance->CopyDirectory(sourcePath, destPath);
}
void CC_Directory::Search(std::string path, std::vector<std::string>& vec, std::string realSymbol)
{
instance->Search(path, vec, realSymbol);
}
void CC_Directory::DisplayDirectoryInformation(std::string path)
{
instance->DisplayDirectoryInformation(path);
}