|
ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
|
系统和文件系统辅助函数 More...
#include "tools/tools/tools_core.h"Namespaces | |
| namespace | ngl::tools |
| 工具函数命名空间。 | |
Functions | |
| std::string | ngl::tools::time2str (int autc, const char *aformat) |
| 将UTC时间戳转换为格式化字符串 | |
| const std::string & | ngl::tools::server_name () |
| 获取当前服务器名称 | |
| int | ngl::tools::rand () |
| 生成随机整数 | |
| bool | ngl::tools::directories_exists (const std::string &apath) |
| 检查目录是否存在 | |
| bool | ngl::tools::file_exists (const std::string &apath) |
| 检查文件是否存在 | |
| bool | ngl::tools::create_dir (const std::string &apath) |
| 创建目录(包括父目录) | |
| bool | ngl::tools::file_remove (const std::string &afile) |
| 删除文件 | |
| void | ngl::tools::dir (const std::string &apath, std::vector< std::string > &afiles, bool aiter) |
| 获取目录下的所有文件 | |
| void | ngl::tools::no_core_dump (bool anocreate) |
| 终止程序(用于致命错误) | |
| std::function< void()> | ngl::tools::send_mail (const std::string &acontent, bool asynchronize) |
| 创建邮件发送函数 | |
| int64_t | ngl::tools::nguidstr2int64 (const char *anguid) |
| 将GUID字符串转换为int64_t | |
系统和文件系统辅助函数
提供系统级工具函数,包括: