Cthulhu  0.2.10
Cthulhu compiler collection
fs.c File Reference
#include "base/panic.h"
#include "core/win32.h"
#include "os/os.h"
#include <limits.h>
Include dependency graph for fs.c:

Go to the source code of this file.

Functions

STA_DECL os_error_t os_file_delete (const char *path)
 delete a file More...
 
STA_DECL os_error_t os_dir_create (const char *path)
 check if a directory exists More...
 
STA_DECL os_error_t os_dir_delete (const char *path)
 delete a directory More...
 
STA_DECL os_dirent_t os_dirent_type (const char *path)
 get the type of a paths inode entry More...
 
STA_DECL size_t os_cwd_get_string (char *buffer, size_t size)
 

Function Documentation

◆ os_cwd_get_string()

STA_DECL size_t os_cwd_get_string ( char *  buffer,
size_t  size 
)

Definition at line 79 of file fs.c.

◆ os_dir_create()

STA_DECL os_error_t os_dir_create ( const char *  path)

check if a directory exists

Parameters
paththe path to the directory to check
Returns
an error if the directory could not be checked
Return values
eOsSuccessif the directory was created
eOsExistsif the directory already exists

Definition at line 25 of file fs.c.

◆ os_dir_delete()

STA_DECL os_error_t os_dir_delete ( const char *  path)

delete a directory

Parameters
paththe path to the directory to delete
Returns
an error if the directory could not be deleted

Definition at line 45 of file fs.c.

◆ os_dirent_type()

STA_DECL os_dirent_t os_dirent_type ( const char *  path)

get the type of a paths inode entry

Parameters
paththe path to the inode entry to check
Returns
the type of the inode entry

Definition at line 57 of file fs.c.

◆ os_file_delete()

STA_DECL os_error_t os_file_delete ( const char *  path)

delete a file

Parameters
paththe path to the file to delete
Returns
an error if the file could not be deleted

Definition at line 12 of file fs.c.