20 if (remove(path) != 0)
40 if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0)
70 if (stat(path, &sb) != 0)
80 if (sb.st_mode & S_IFDIR)
84 if (sb.st_mode & S_IFREG)
104 if (getcwd(buffer,
size) == NULL)
os_dirent_t
directory entry type
#define STA_DECL
sal2 annotation on function implementations to copy annotations from the declaration
CT_NODISCARD CT_PUREFN CT_BASE_API size_t ctu_strlen(const char *str)
get the length of a string not including the null terminator equivalent to strlen but with safety che...
#define CTASSERT(expr)
assert a condition, prints the condition as a message
STA_DECL size_t os_cwd_get_string(char *buffer, size_t size)
STA_DECL os_error_t os_dir_create(const char *path)
check if a directory exists
STA_DECL os_dirent_t os_dirent_type(const char *path)
get the type of a paths inode entry
STA_DECL os_error_t os_file_delete(const char *path)
delete a file
STA_DECL os_error_t os_dir_delete(const char *path)
delete a directory
CT_LOCAL size_t impl_maxname(void)