use temp files (then rename) when moving files for moveonenospc

This commit is contained in:
Antonio SJ Musumeci 2017-06-28 21:17:47 -04:00
parent fa3ff40218
commit aea2b40dda
4 changed files with 86 additions and 7 deletions

View file

@ -20,6 +20,7 @@
#include <string>
#include <vector>
#include <fcntl.h>
#include <stdint.h>
namespace fs
@ -59,6 +60,8 @@ namespace fs
void realpathize(vector<string> &strs);
int getfl(const int fd);
int setfl(const int fd,
const mode_t mode);
int mfs(const vector<string> &srcs,
const uint64_t minfreespace,