tiny-shell 0.2
A mini shell project aiming to gain knowledge about Win32 and Linux API
Loading...
Searching...
No Matches
operations.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdbool.h>
4
5#include "../core/args.h"
6#include "type.h"
7
9void get_cwd(unsigned int buffer_size, os_char *buffer);
10
15bool change_cwd(const os_char *new_dir);
16
19
21bool kill_process(int proc_id);
22
24bool resume(int proc_id);
25
27bool show_child_processes(int proc_id);
28
30bool delete_file(const os_char *filename);
31
33bool lsdir(const os_char *dir);
34
36bool launch_executable(const struct args args);
37
42bool set_shell_env(const os_char *name, const os_char *val);
43
47bool unset_shell_env(const os_char *name);
48
50bool get_shell_env(const os_char *var, unsigned int buffer_size, os_char *buffer);
51
53bool has_shell_env(const os_char *var);
54
57
59bool enum_proc();
60
62bool get_time();
63
65bool get_date();
66
68bool stop_proccess(int proc_id);
69
71bool minibat(const struct args args);
bool stop_proccess(int proc_id)
Stop a process use it ID.
bool get_date()
Get current date.
bool has_shell_env(const os_char *var)
Check if a variable environment exists.
bool change_cwd(const os_char *new_dir)
Attempt to change current working directory.
bool get_shell_env(const os_char *var, unsigned int buffer_size, os_char *buffer)
Get value of an an environment variable.
void clear_screen()
Clear the console.
bool kill_process(int proc_id)
Kill a process.
bool show_child_processes(int proc_id)
Show child processes.
bool enum_proc()
List all running processes.
bool lsdir(const os_char *dir)
List of files or folders in specific directory.
bool minibat(const struct args args)
Launch shell executable and execute the file specified by args.argv[0]
os_char * get_all_shell_env_display()
Get all current environment variable.
bool delete_file(const os_char *filename)
Delete a specific file.
bool set_shell_env(const os_char *name, const os_char *val)
Set environment variable of the shell process.
bool launch_executable(const struct args args)
Launch the executable.
bool get_time()
Get current time.
bool unset_shell_env(const os_char *name)
Unset environment variable of the shell process.
void get_cwd(unsigned int buffer_size, os_char *buffer)
Fetch current working directory and copy them into buffer
bool resume(int proc_id)
Resume running a process.
Result after parsing an arbitrary string.
Definition args.h:10