-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathccdirectorylinux.h
37 lines (33 loc) · 1.53 KB
/
ccdirectorylinux.h
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
#pragma once
#include "platformconfig.h"
#if CCTARGET_PLATFORM == CCPLATFORM_LINUX
#include "ccdirectorystrategy.h"
class CC_directory_linux : public CC_directory_strategy
{
public:
void CreateDirectory(std::string path)override;
void RemoveDirectory(std::string path)override;
std::vector<std::string> GetSubDirectoriesCollection(std::string path)override;
std::vector<std::string> GetFiles(std::string path)override;
bool Exists(std::string path)override;
std::string GetCurrentDirectory()override;
void DisplayDirectoryInformation(std::string path)override;
std::string GetDirectoryRoot(std::string path)override;
void MoveDirectory(std::string sourcePath, std::string destPath)override;
void CopyDirectory(std::string sourcePath, std::string destPath)override;
void Search(std::string path, std::vector<std::string>& vec, std::string realSymbol)override;
void test(std::string path);
private:
void ParseDirectoryTree(std::string& path, std::vector<std::string>& treePath);
void ParseOriginDirectoryTree(std::string& path, DirectoryInfo&);
void SplitFilesAndDirectories(
std::vector<std::string>& originTree,
std::string& newPath, std::string& oldPath,
std::vector<std::string>&splitedOldFiles,
std::vector<std::string>&splitedNewDirectories,
std::vector<std::string>&splitedNewFiles);
void RebuildCatalogTree(std::vector<std::string>& newDirectory);
void CopyOriginFile(std::vector<std::string>& originFiles, std::vector<std::string>& newFiles);
void RemoveOldCatalogTree(std::vector<std::string>& originalPathTree);
};
#endif