Agora
1.2.0
Agora project
|
Go to the documentation of this file.
6 #ifndef SPDLOG_HEADER_ONLY
24 : event_handlers_(event_handlers)
87 if (std::fflush(
fd_) != 0)
114 size_t msg_size = buf.
size();
151 auto ext_index = fname.rfind(
'.');
155 if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1)
162 if (folder_index != filename_t::npos && folder_index >= ext_index - 1)
168 return std::make_tuple(fname.substr(0, ext_index), fname.substr(ext_index));
size_t size() const
Definition: file_helper-inl.h:122
void open(const filename_t &fname, bool truncate=false)
Definition: file_helper-inl.h:32
static std::tuple< filename_t, filename_t > split_by_extension(const filename_t &fname)
Definition: file_helper-inl.h:149
SPDLOG_INLINE void sleep_for_millis(unsigned int milliseconds) SPDLOG_NOEXCEPT
Definition: os-inl.h:376
string mode
Definition: mm_gui.py:105
constexpr auto size() const -> size_t
Definition: core.h:820
void reopen(bool truncate)
Definition: file_helper-inl.h:76
std::function< void(const filename_t &filename, std::FILE *file_stream)> before_close
Definition: common.h:312
SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mode)
Definition: os-inl.h:123
void close()
Definition: file_helper-inl.h:93
SPDLOG_INLINE bool create_dir(const filename_t &path)
Definition: os-inl.h:545
std::FILE * fd_
Definition: file_helper.h:52
SPDLOG_INLINE void throw_spdlog_ex(const std::string &msg, int last_errno)
Definition: common-inl.h:72
const filename_t & filename() const
Definition: file_helper-inl.h:131
SPDLOG_INLINE std::string filename_to_str(const filename_t &filename)
Definition: os-inl.h:398
#define SPDLOG_INLINE
Definition: common.h:42
SPDLOG_INLINE size_t filesize(FILE *f)
Definition: os-inl.h:209
~file_helper()
Definition: file_helper-inl.h:27
void write(const memory_buf_t &buf)
Definition: file_helper-inl.h:112
static const SPDLOG_CONSTEXPR filename_t::value_type folder_seps_filename[]
Definition: os.h:44
filename_t filename_
Definition: file_helper.h:53
auto data() -> T *
Definition: core.h:826
#define SPDLOG_FILENAME_T(s)
Definition: common.h:123
void flush()
Definition: file_helper-inl.h:85
const int open_tries_
Definition: file_helper.h:50
std::function< void(const filename_t &filename, std::FILE *file_stream)> after_open
Definition: common.h:311
std::function< void(const filename_t &filename)> after_close
Definition: common.h:313
fwrite(fileID, pilot_f, 'float')
std::function< void(const filename_t &filename)> before_open
Definition: common.h:310
file_event_handlers event_handlers_
Definition: file_helper.h:54
std::string filename_t
Definition: common.h:122
const unsigned int open_interval_
Definition: file_helper.h:51
SPDLOG_INLINE filename_t dir_name(const filename_t &path)
Definition: os-inl.h:584