-
Notifications
You must be signed in to change notification settings - Fork 15
/
fileutils.h
executable file
·48 lines (27 loc) · 1.2 KB
/
fileutils.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
38
39
40
41
42
43
44
45
46
47
48
#ifndef _FILEUTILS_H_
#define _FILEUTILS_H_
#include <string>
#include <vector>
namespace File_utils
{
// File operations
void copyFile(const std::vector<std::string> &p_src, const std::string &p_dest);
void moveFile(const std::vector<std::string> &p_src, const std::string &p_dest);
void symlinkFile(const std::vector<std::string> &p_src, const std::string &p_dest);
void removeFile(const std::vector<std::string> &p_files);
void executeFile(const std::string &p_file);
void makeDirectory(const std::string &p_file);
void renameFile(const std::string &p_file1, const std::string &p_file2);
// File utilities
const bool fileExists(const std::string &p_path);
std::string getLowercaseFileExtension(const std::string &name);
const unsigned long int getFileSize(const std::string &p_file);
void formatSize(std::string &p_size);
const std::string getFileName(const std::string &p_path);
const std::string getPath(const std::string &p_path);
void stringReplace(std::string &p_string, const std::string &p_search, const std::string &p_replace);
// Dialogs
void diskInfo(void);
void diskUsed(const std::vector<std::string> &p_files);
}
#endif