Cthulhu  0.2.10
Cthulhu compiler collection
fs.c File Reference
#include "os/os.h"
#include "os_common.h"
#include "base/panic.h"
#include "base/util.h"
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.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 93 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 29 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 52 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 65 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 16 of file fs.c.