-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileCtrl.h
More file actions
156 lines (139 loc) · 3.66 KB
/
FileCtrl.h
File metadata and controls
156 lines (139 loc) · 3.66 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#pragma once
#include <Windows.h>
#include <string>
#include <vector>
#include <filesystem>
#include <format>
#include <fstream>
#pragma comment(lib, "version.lib")
#pragma hdrstop
#include "StrCtrl.h"
#include "ErrorCtrl.h"
#include "CommonStruct.h"
#ifdef CreateDirectory
#undef CreateDirectory
#endif
#ifdef CopyFile
#undef CopyFile
#endif
class CFileCtrl;
extern CFileCtrl FileCtrl;
class CFileCtrl : protected CErrorCtrl
{
public:
public:
CFileCtrl();
virtual ~CFileCtrl();
public:
/**
* 디렉토리를 생성하는 기능.
*
* \param strPath - 생성할 디렉토리의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL CreateDirectory(std::string strPath);
/**
* 디렉토리를 생성하는 기능.
*
* \param strPath - 생성할 디렉토리의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL CreateDirectory(std::wstring strPath);
/**
* 파일의 존재 여부를 확인하는 기능.
*
* \param strPath - 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL FileExists(std::string strPath);
/**
* 파일의 존재 여부를 확인하는 기능.
*
* \param strPath - 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL FileExists(std::wstring strPath);
/**
* 파일의 타입 정보를 가져오는 기능.
*
* \param strPath - 검사할 파일의 경로
* \return
*/
FileType GetType(std::string strPath);
/**
* 파일의 타입 정보를 가져오는 기능.
*
* \param strPath - 검사할 파일의 경로
* \return
*/
FileType GetType(std::wstring strPath);
/**
* 파일을 복사하는 기능.
*
* \param strSrc - 복사할 파일의 경로
* \param strDst - 복사된 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL CopyFile(std::string strSrc, std::string strDst);
/**
* 파일을 복사하는 기능.
*
* \param strSrc - 복사할 파일의 경로
* \param strDst - 복사된 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL CopyFile(std::wstring wstrSrc, std::wstring wstrDst);
/**
* 디렉토리에 파일 목록을 가져오는 기능.
*
* \param strPath - 파일의 경로
* \param files - 파일을 받아올 공간
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL GetFiles(std::string strPath, std::vector<std::string>* files);
/**
* 디렉토리에 파일 목록을 가져오는 기능.
*
* \param strPath - 파일의 경로
* \param files - 파일을 받아올 공간
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL GetFiles(std::wstring wstrPath, std::vector<std::wstring>* files);
/**
* 파일을 삭제하는 기능.
*
* \param wstrPath - 삭제할 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL RemoveFile(std::wstring wstrPath);
/**
* 파일(디렉토리 구분 없이)을 삭제하는 기능.
*
* \param wstrPath - 삭제할 파일의 경로
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL RemoveFile(std::string wstrPath);
/**
* 파일의 버전을 얻는 기능 .
*
* \param strPath - 버전을 얻을 파일 경로
* \param version - 버전 정보가 담길 공간
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL FileVersion(std::string& strPath, std::string& version);
/**
* 파일의 버전을 얻는 기능 .
*
* \param strPath - 버전을 얻을 파일 경로
* \param version - 버전 정보가 담길 공간
* \return 성공(TRUE), 실패(FALSE)
*/
BOOL FileVersion(std::wstring& strPath, std::wstring& version);
/**
* 특정 파일이 64비트 헤더를 갖고 있는지 검사하는 기능.
*
* \param strPath - 정보를 얻고자 하는 파일의 경로
* \return
*/
BOOL Is64BitFile(std::string& strPath);
};