2014-11-15 23:47:38 +01:00
|
|
|
#pragma once
|
2014-11-16 00:05:28 +01:00
|
|
|
#ifndef FSPP_FILE_H_
|
|
|
|
#define FSPP_FILE_H_
|
2014-11-15 23:47:38 +01:00
|
|
|
|
2014-11-16 00:10:29 +01:00
|
|
|
#include "Node.h"
|
2015-06-18 19:30:52 +02:00
|
|
|
#include <messmer/cpp-utils/unique_ref.h>
|
2014-11-15 23:47:38 +01:00
|
|
|
|
2014-11-16 00:05:28 +01:00
|
|
|
namespace fspp {
|
2014-11-15 23:47:38 +01:00
|
|
|
class Device;
|
|
|
|
class OpenFile;
|
|
|
|
|
|
|
|
class File: public virtual Node {
|
|
|
|
public:
|
|
|
|
virtual ~File() {}
|
|
|
|
|
2015-06-18 19:30:52 +02:00
|
|
|
virtual cpputils::unique_ref<OpenFile> open(int flags) const = 0;
|
2014-11-15 23:47:38 +01:00
|
|
|
virtual void truncate(off_t size) const = 0;
|
|
|
|
};
|
|
|
|
|
2015-03-18 02:45:35 +01:00
|
|
|
}
|
2014-11-15 23:47:38 +01:00
|
|
|
|
2015-03-18 02:45:35 +01:00
|
|
|
#endif
|