Sese Framework
x.y.z
A cross-platform framework
|
文件流类 更多...
#include <FileStream.h>
Public 类型 | |
using | Ptr = std::shared_ptr<FileStream> |
Public 类型 继承自 sese::io::Stream | |
typedef std::shared_ptr< Stream > | Ptr |
Public 类型 继承自 sese::io::InputStream | |
typedef std::shared_ptr< InputStream > | Ptr |
Public 类型 继承自 sese::io::OutputStream | |
typedef std::shared_ptr< OutputStream > | Ptr |
Public 类型 继承自 sese::io::PeekableStream | |
typedef std::shared_ptr< PeekableStream > | Ptr |
Public 成员函数 | |
~FileStream () override=default | |
int64_t | read (void *buffer, size_t length) override |
int64_t | write (const void *buffer, size_t length) override |
void | close () override |
int64_t | peek (void *buffer, size_t length) override |
int64_t | trunc (size_t length) override |
bool | eof () const |
int64_t | getSeek () const |
int32_t | setSeek (int64_t offset, int32_t whence) const |
int32_t | setSeek (int64_t offset, Seek type) const |
int32_t | flush () const |
int32_t | getFd () const |
Public 成员函数 继承自 sese::io::InputStream | |
virtual | ~InputStream () noexcept=default |
Public 成员函数 继承自 sese::io::OutputStream | |
virtual | ~OutputStream () noexcept=default |
int64_t | write (const std::string_view &buffer) |
int64_t | write (const text::StringView &buffer) |
template<typename T > | |
int64_t | write (std::vector< T > &buffer) |
template<typename T , size_t N> | |
int64_t | write (std::array< T, N > &buffer) |
Public 成员函数 继承自 sese::io::Closeable | |
virtual | ~Closeable ()=default |
Public 成员函数 继承自 sese::io::PeekableStream | |
virtual | ~PeekableStream ()=default |
静态 Public 成员函数 | |
static FileStream::Ptr | create (const std::string &file_path, const char *mode) noexcept |
static FileStream::Ptr | createWithPath (const system::Path &path, const char *mode) noexcept |
static Result< FileStream::Ptr > | createEx (const std::string &file_path, const char *mode) noexcept |
静态 Public 属性 | |
static constexpr auto | B_READ = "rb" |
static constexpr auto | B_WRITE_TRUNC = "wb" |
static constexpr auto | B_WRITE_APPEND = "ab" |
static constexpr auto | B_TRUNC = "wb+" |
static constexpr auto | B_APPEND = "ab+" |
static constexpr auto | T_READ = "rt" |
static constexpr auto | T_WRITE_TRUNC = "wt" |
static constexpr auto | T_WRITE_APPEND = "at" |
static constexpr auto | T_TRUNC = "wt+" |
static constexpr auto | T_APPEND = "at+" |
Private 成员函数 | |
FileStream () noexcept=default | |
Private 属性 | |
FILE * | file = nullptr |
文件流类
using sese::io::FileStream::Ptr = std::shared_ptr<FileStream> |
|
overridedefault |
|
privatedefaultnoexcept |
|
overridevirtual |
实现了 sese::io::Closeable.
引用了 file.
|
staticnoexcept |
打开一个文件流
file_path | 文件路径 |
mode | 打开模式 |
nullptr | 打开失败 |
文件流对象 |
引用了 MAKE_SHARED_PRIVATE.
被这些函数引用 sese::archive::ArchiveWriter::addDirectory(), sese::archive::ArchiveWriter::addFile(), sese::record::BlockAppender::BlockAppender(), sese::text::TextReader::create(), sese::UniReader::create(), createWithPath(), sese::record::BlockAppender::dump() , 以及 sese::internal::service::http::HttpServiceImpl::handleRequest().
|
staticnoexcept |
引用了 sese::getErrorCode() , 以及 sese::getErrorString().
|
staticnoexcept |
|
nodiscard |
|
nodiscard |
引用了 file.
|
nodiscard |
引用了 file.
|
nodiscard |
引用了 file.
|
overridevirtual |
|
overridevirtual |
|
nodiscard |
|
overridevirtual |
|
overridevirtual |
引用了 file.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
staticconstexpr |
|
staticconstexpr |
被这些函数引用 sese::text::TextReader::create() , 以及 sese::UniReader::create().
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |