1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/common/pipe_file_system.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/file_system.hpp"
12
13namespace duckdb {
14
15class PipeFileSystem : public FileSystem {
16public:
17 static unique_ptr<FileHandle> OpenPipe(unique_ptr<FileHandle> handle);
18
19 int64_t Read(FileHandle &handle, void *buffer, int64_t nr_bytes) override;
20 int64_t Write(FileHandle &handle, void *buffer, int64_t nr_bytes) override;
21
22 int64_t GetFileSize(FileHandle &handle) override;
23
24 void Reset(FileHandle &handle) override;
25 bool OnDiskFile(FileHandle &handle) override {
26 return false;
27 };
28 bool CanSeek() override {
29 return false;
30 }
31 void FileSync(FileHandle &handle) override;
32
33 std::string GetName() const override {
34 return "PipeFileSystem";
35 }
36};
37
38} // namespace duckdb
39