TeaSpeak-Client/native/updater/file.h

25 lines
718 B
C
Raw Normal View History

2019-10-25 19:51:40 -04:00
#pragma once
#include <string>
namespace file {
/**
* @param source
* @param target If empty then the file will be deleted
* @return
*/
extern bool move(std::string& error, const std::string& source, const std::string& target);
extern void drop_backup(const std::string& source);
extern std::string register_backup(const std::string& source);
extern void rollback();
2019-10-27 16:50:25 -04:00
extern void commit();
2019-10-25 19:51:40 -04:00
2020-12-02 12:08:49 -05:00
/**
* @param path The target path to test
* @returns true if the target path is writeable or if it does not exists is createable.
*/
extern bool directory_writeable(const std::string &path /* file */);
2019-10-25 19:51:40 -04:00
extern bool file_locked(const std::string& file);
}