2014-11-15 15:16:18 +01:00
|
|
|
#pragma once
|
2015-10-15 13:04:57 +02:00
|
|
|
#ifndef MESSMER_FSPP_FSINTERFACE_NODE_H_
|
|
|
|
#define MESSMER_FSPP_FSINTERFACE_NODE_H_
|
2014-11-15 15:16:18 +01:00
|
|
|
|
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
2014-11-16 00:05:28 +01:00
|
|
|
namespace fspp {
|
2014-11-15 15:16:18 +01:00
|
|
|
|
2014-11-15 23:47:38 +01:00
|
|
|
class Node {
|
2014-11-15 15:16:18 +01:00
|
|
|
public:
|
2014-11-15 23:47:38 +01:00
|
|
|
virtual ~Node() {}
|
2014-11-15 15:16:18 +01:00
|
|
|
|
2014-11-15 16:33:24 +01:00
|
|
|
virtual void stat(struct ::stat *result) const = 0;
|
2015-04-21 21:08:23 +02:00
|
|
|
virtual void chmod(mode_t mode) = 0;
|
|
|
|
virtual void chown(uid_t uid, gid_t gid) = 0;
|
2014-11-15 16:33:24 +01:00
|
|
|
virtual void access(int mask) const = 0;
|
|
|
|
virtual void rename(const boost::filesystem::path &to) = 0;
|
|
|
|
virtual void utimens(const timespec times[2]) = 0;
|
2015-04-10 23:24:28 +02:00
|
|
|
virtual void remove() = 0;
|
2014-11-15 15:16:18 +01:00
|
|
|
};
|
|
|
|
|
2015-03-18 02:45:35 +01:00
|
|
|
}
|
2014-11-15 15:16:18 +01:00
|
|
|
|
2015-03-18 02:45:35 +01:00
|
|
|
#endif
|