-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.hpp
More file actions
28 lines (23 loc) · 809 Bytes
/
backup.hpp
File metadata and controls
28 lines (23 loc) · 809 Bytes
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
// Copyright 2025 Alex Batista Resende
#ifndef BACKUP_HPP_
#define BACKUP_HPP_
#include <string>
#include <ctime> // Adicionado para o tipo time_t
// Enum para os códigos de status da operação
enum StatusOperacao {
OPERACAO_SUCESSO,
ERRO_BACKUP_PARM_NAO_EXISTE,
ERRO_DESTINO_MAIS_NOVO,
ERRO_ORIGEM_MAIS_ANTIGA,
ERRO_ARQUIVO_ORIGEM_NAO_EXISTE,
ERRO_SEM_PERMISSAO
};
// Declaração das funções
int realizaBackup(const std::string& destino_path);
int realizaRestauracao(const std::string& origem_path);
void registrarLog(const std::string& contexto,
const std::string& arquivo,
const std::string& mensagem);
// Declaração da função auxiliar para que outros arquivos a conheçam
time_t getFileModTime(const std::string& path);
#endif // BACKUP_HPP_