title: "WP_CLI\Utils\get_temp_dir()" post_status: publish comment_status: open taxonomy: category: - wp-cli-handbook post_tag: - Internal Api - References - Repos
WP_CLI\Utils\get_temp_dir()
获取系统的临时目录。如果不可写,会向用户发出警告。
用法
WP_CLI\Utils\get_temp_dir()
@return (string)
内部 API 文档随每次 WP-CLI 代码库发布而生成。如需改进,请提交拉取请求。
相关函数
- WP_CLI\Utils\get_home_dir() - 获取主目录。
- WP_CLI\Utils\trailingslashit() - 添加尾部斜杠。
- WP_CLI\Utils\normalize_path() - 规范化文件系统路径。
- WP_CLI\Utils\get_php_binary() - 获取执行 WP-CLI 时使用的 PHP 二进制文件路径。
- WP_CLI::get_php_binary() - 获取执行 WP-CLI 时使用的 PHP 二进制文件路径。