|
hoshi-lang dev
Yet another programming language
|
#include <dirent.h>#include "fs.h"#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <limits.h>#include <pwd.h>#include <sys/types.h>#include <unistd.h>
Go to the source code of this file.
Macros | |
| #define | _POSIX_C_SOURCE 200809L |
| #define | _XOPEN_SOURCE 700 |
| #define | _CRT_SECURE_NO_WARNINGS |
| #define | stat_struct struct stat |
| #define | stat_func stat |
| #define | PATH_SEPARATOR '/' |
Functions | |
| static int | get_stat (const char *path, stat_struct *buf) |
| bool | runtime_fs_exists (const char *path) |
| bool | runtime_fs_isfile (const char *path) |
| bool | runtime_fs_isdir (const char *path) |
| bool | runtime_fs_issymlink (const char *path) |
| int64_t | runtime_fs_get_mtime (const char *path) |
| uint64_t | runtime_fs_get_size (const char *path) |
| int64_t | runtime_fs_get_ctime (const char *path) |
| int64_t | runtime_fs_get_atime (const char *path) |
| int | runtime_fs_get_uid (const char *path) |
| char * | runtime_fs_temp_dir () |
| char * | runtime_fs_home_dir () |
| char * | runtime_fs_cwd () |
| char * | runtime_fs_realpath (const char *path) |
| void | runtime_fs_finalize (void *res) |
| bool | runtime_fs_mkdir (const char *path, int mode) |
| bool | runtime_fs_rmdir (const char *path) |
| bool | runtime_fs_remove (const char *path) |
| bool | runtime_fs_rename (const char *old_path, const char *new_path) |
| void * | runtime_fs_opendir (const char *name) |
| char * | runtime_fs_readdir (void *dir) |
| void | runtime_fs_closedir (void *dir) |
| bool | runtime_fs_symlink (const char *src_path, const char *dest_path) |
|
static |
Definition at line 64 of file fs.cpp.
References stat_func.
Referenced by runtime_fs_get_atime(), runtime_fs_get_ctime(), runtime_fs_get_mtime(), runtime_fs_get_size(), runtime_fs_get_uid(), runtime_fs_isdir(), and runtime_fs_isfile().

| int64_t runtime_fs_get_atime | ( | const char * | path | ) |
Definition at line 127 of file fs.cpp.
References get_stat(), and stat_struct.

| int64_t runtime_fs_get_ctime | ( | const char * | path | ) |
Definition at line 120 of file fs.cpp.
References get_stat(), and stat_struct.

| int64_t runtime_fs_get_mtime | ( | const char * | path | ) |
Definition at line 106 of file fs.cpp.
References get_stat(), and stat_struct.

| uint64_t runtime_fs_get_size | ( | const char * | path | ) |
Definition at line 113 of file fs.cpp.
References get_stat(), and stat_struct.

| int runtime_fs_get_uid | ( | const char * | path | ) |
Definition at line 134 of file fs.cpp.
References get_stat(), and stat_struct.

| bool runtime_fs_isdir | ( | const char * | path | ) |
Definition at line 85 of file fs.cpp.
References get_stat(), and stat_struct.
Referenced by runtime_fs_symlink().


| bool runtime_fs_isfile | ( | const char * | path | ) |
Definition at line 78 of file fs.cpp.
References get_stat(), and stat_struct.

| bool runtime_fs_rename | ( | const char * | old_path, |
| const char * | new_path | ||
| ) |
| bool runtime_fs_symlink | ( | const char * | src_path, |
| const char * | dest_path | ||
| ) |
Definition at line 359 of file fs.cpp.
References runtime_fs_isdir().
