hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
fs.h File Reference
#include <cstdint>
#include <cstddef>
#include <cstdio>
Include dependency graph for fs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LIBFS_EXPORT   extern "C"
 

Functions

LIBFS_EXPORT bool runtime_fs_exists (const char *path)
 
LIBFS_EXPORT bool runtime_fs_isfile (const char *path)
 
LIBFS_EXPORT bool runtime_fs_isdir (const char *path)
 
LIBFS_EXPORT bool runtime_fs_issymlink (const char *path)
 
LIBFS_EXPORT int64_t runtime_fs_get_mtime (const char *path)
 
LIBFS_EXPORT uint64_t runtime_fs_get_size (const char *path)
 
LIBFS_EXPORT int64_t runtime_fs_get_ctime (const char *path)
 
LIBFS_EXPORT int64_t runtime_fs_get_atime (const char *path)
 
LIBFS_EXPORT int runtime_fs_get_mode (const char *path)
 
LIBFS_EXPORT int runtime_fs_get_uid (const char *path)
 
LIBFS_EXPORT char * runtime_fs_temp_dir ()
 
LIBFS_EXPORT char * runtime_fs_home_dir ()
 
LIBFS_EXPORT char * runtime_fs_cwd ()
 
LIBFS_EXPORT char * runtime_fs_realpath (const char *path)
 
LIBFS_EXPORT void runtime_fs_finalize (void *res)
 
LIBFS_EXPORT bool runtime_fs_mkdir (const char *path, int mode)
 
LIBFS_EXPORT bool runtime_fs_rmdir (const char *path)
 
LIBFS_EXPORT bool runtime_fs_rename (const char *old_path, const char *new_path)
 
LIBFS_EXPORT bool runtime_fs_remove (const char *path)
 
LIBFS_EXPORT void * runtime_fs_opendir (const char *name)
 
LIBFS_EXPORT char * runtime_fs_readdir (void *dir)
 
LIBFS_EXPORT void runtime_fs_closedir (void *dir)
 
LIBFS_EXPORT bool runtime_fs_symlink (const char *src_path, const char *dest_path)
 

Macro Definition Documentation

◆ LIBFS_EXPORT

#define LIBFS_EXPORT   extern "C"

Definition at line 12 of file fs.h.

Function Documentation

◆ runtime_fs_closedir()

LIBFS_EXPORT void runtime_fs_closedir ( void *  dir)

Definition at line 344 of file fs.cpp.

◆ runtime_fs_cwd()

LIBFS_EXPORT char * runtime_fs_cwd ( )

Definition at line 209 of file fs.cpp.

◆ runtime_fs_exists()

LIBFS_EXPORT bool runtime_fs_exists ( const char *  path)

Definition at line 70 of file fs.cpp.

◆ runtime_fs_finalize()

LIBFS_EXPORT void runtime_fs_finalize ( void *  res)

Definition at line 251 of file fs.cpp.

◆ runtime_fs_get_atime()

LIBFS_EXPORT int64_t runtime_fs_get_atime ( const char *  path)

Definition at line 127 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_get_ctime()

LIBFS_EXPORT int64_t runtime_fs_get_ctime ( const char *  path)

Definition at line 120 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_get_mode()

LIBFS_EXPORT int runtime_fs_get_mode ( const char *  path)

◆ runtime_fs_get_mtime()

LIBFS_EXPORT int64_t runtime_fs_get_mtime ( const char *  path)

Definition at line 106 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_get_size()

LIBFS_EXPORT uint64_t runtime_fs_get_size ( const char *  path)

Definition at line 113 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_get_uid()

LIBFS_EXPORT int runtime_fs_get_uid ( const char *  path)

Definition at line 134 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_home_dir()

LIBFS_EXPORT char * runtime_fs_home_dir ( )

Definition at line 177 of file fs.cpp.

◆ runtime_fs_isdir()

LIBFS_EXPORT 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runtime_fs_isfile()

LIBFS_EXPORT bool runtime_fs_isfile ( const char *  path)

Definition at line 78 of file fs.cpp.

References get_stat(), and stat_struct.

Here is the call graph for this function:

◆ runtime_fs_issymlink()

LIBFS_EXPORT bool runtime_fs_issymlink ( const char *  path)

Definition at line 92 of file fs.cpp.

◆ runtime_fs_mkdir()

LIBFS_EXPORT bool runtime_fs_mkdir ( const char *  path,
int  mode 
)

Definition at line 257 of file fs.cpp.

◆ runtime_fs_opendir()

LIBFS_EXPORT void * runtime_fs_opendir ( const char *  name)

Definition at line 292 of file fs.cpp.

◆ runtime_fs_readdir()

LIBFS_EXPORT char * runtime_fs_readdir ( void *  dir)

Definition at line 319 of file fs.cpp.

◆ runtime_fs_realpath()

LIBFS_EXPORT char * runtime_fs_realpath ( const char *  path)

Definition at line 239 of file fs.cpp.

◆ runtime_fs_remove()

LIBFS_EXPORT bool runtime_fs_remove ( const char *  path)

Definition at line 277 of file fs.cpp.

◆ runtime_fs_rename()

LIBFS_EXPORT bool runtime_fs_rename ( const char *  old_path,
const char *  new_path 
)

Definition at line 288 of file fs.cpp.

◆ runtime_fs_rmdir()

LIBFS_EXPORT bool runtime_fs_rmdir ( const char *  path)

Definition at line 267 of file fs.cpp.

◆ runtime_fs_symlink()

LIBFS_EXPORT bool runtime_fs_symlink ( const char *  src_path,
const char *  dest_path 
)

Definition at line 359 of file fs.cpp.

References runtime_fs_isdir().

Here is the call graph for this function:

◆ runtime_fs_temp_dir()

LIBFS_EXPORT char * runtime_fs_temp_dir ( )

Definition at line 141 of file fs.cpp.