24#include "AstUtil/IO.hpp"
25#include "AstUtil/StringPosix.hpp"
51#if defined(_WIN32) || defined(AST_PARSED_BY_DOXYGEN)
53 using stat = struct ::_stat;
61 return ::_fileno(file);
76 return (_S_IFDIR & st.st_mode) != 0;
95 return ::_fstat(fd, buf);
122 bool isdir(
const struct stat& st)
124 return S_ISDIR(st.st_mode);
138#if defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
143 const char* getenv(
const char* name){
144 const char*
const env = std::getenv(name);
145 return (env !=
nullptr && env[0] !=
'\0') ? env :
nullptr;
AST_UTIL_API int rmdir(const char *path)
删除目录
A_ALWAYS_INLINE int fileno(FILE *file)
获取文件流的文件描述符
定义 Posix.hpp:59
AST_UTIL_API int chdir(const char *path)
改变当前工作目录
AST_UTIL_API char * getcwd(char *buf, size_t size)
获取当前工作目录
A_ALWAYS_INLINE int fstat(int fd, stat *buf)
获取文件状态
定义 Posix.hpp:93
A_ALWAYS_INLINE bool isdir(const stat &st)
检查文件状态是否为目录
定义 Posix.hpp:74
A_ALWAYS_INLINE int isatty(int fd)
判断文件描述符是否为终端
定义 Posix.hpp:83