forked from ankurdubey521/dotfile-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmisc.h
36 lines (27 loc) · 777 Bytes
/
misc.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
/*
* Provides miscellaneous functions for support
*/
#ifndef DOTFILE_MANAGER_MISC_H
#define DOTFILE_MANAGER_MISC_H
#include <array>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <memory>
#include <stdexcept>
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
//Returns the "text" output of a shell command
std::string exec(const char*);
//Returns true if a directory exists
bool IsPathExist(const std::string&);
//Returns true if a file exists
bool fexists(const std::string&);
//Encrypts a file using gpg
void encrypt(const std::string&, const std::string&, const std::string&);
//Decrypts a gpg encrypted file
void decrypt(const std::string&, const std::string&);
//Display help
void display_help();
#endif //DOTFILE_MANAGER_EXEC_H