ClickHouse/src/Common/tryGetFileNameByFileDescriptor.h
v01dxyz 8e63d2f795 Compress STDOUT if redirected to file with a compression extension
* Add a new member to ClientBase: default_output_compression_method
* Move the code to get file path from file descriptor to a separate
  Common function.

The stateless test is almost a copy-paste of 02001_compress_output_file.

Fixes https://github.com/ClickHouse/ClickHouse/issues/63496
2024-05-13 09:21:01 +02:00

11 lines
208 B
C++

#pragma once
#include <optional>
#include <base/types.h>
namespace DB
{
/// Supports only Linux/MacOS. On other platforms, returns nullopt.
std::optional<String> tryGetFileNameFromFileDescriptor(int fd);
}