Kintsugi OS 0.5.0
x86 Monolithic OS
Loading...
Searching...
No Matches
commands_fs.c File Reference
#include "../fs/fat12.h"
#include "../fs/vfs.h"
#include "../kklibc/kklibc.h"
#include "shell.h"

Functions

static int report (int result)
 
static int list (int argc, char **argv)
 
static int cat (int argc, char **argv)
 
static int create (int argc, char **argv)
 
static int remove_file (int argc, char **argv)
 
static int mkdir_command (int argc, char **argv)
 
static int rmdir_command (int argc, char **argv)
 
static int cd (int argc, char **argv)
 
static int pwd (int argc, char **argv)
 
static int text_write (int argc, char **argv, int append)
 
static int write_file (int argc, char **argv)
 
static int append_file (int argc, char **argv)
 
static int copy (int argc, char **argv)
 
static int move (int argc, char **argv)
 
static int truncate_file (int argc, char **argv)
 
static int stat_file (int argc, char **argv)
 
static int fs_info (int argc, char **argv)
 
static int load_file (int argc, char **argv)
 
static int fs_test (int argc, char **argv)
 

Variables

const shell_command_t shell_fs_commands []
 

Function Documentation

◆ append_file()

static int append_file ( int  argc,
char **  argv 
)
static

◆ cat()

static int cat ( int  argc,
char **  argv 
)
static

◆ cd()

static int cd ( int  argc,
char **  argv 
)
static

◆ copy()

static int copy ( int  argc,
char **  argv 
)
static

◆ create()

static int create ( int  argc,
char **  argv 
)
static

◆ fs_info()

static int fs_info ( int  argc,
char **  argv 
)
static

◆ fs_test()

static int fs_test ( int  argc,
char **  argv 
)
static

◆ list()

static int list ( int  argc,
char **  argv 
)
static

◆ load_file()

static int load_file ( int  argc,
char **  argv 
)
static

◆ mkdir_command()

static int mkdir_command ( int  argc,
char **  argv 
)
static

◆ move()

static int move ( int  argc,
char **  argv 
)
static

◆ pwd()

static int pwd ( int  argc,
char **  argv 
)
static

◆ remove_file()

static int remove_file ( int  argc,
char **  argv 
)
static

◆ report()

static int report ( int  result)
static

◆ rmdir_command()

static int rmdir_command ( int  argc,
char **  argv 
)
static

◆ stat_file()

static int stat_file ( int  argc,
char **  argv 
)
static

◆ text_write()

static int text_write ( int  argc,
char **  argv,
int  append 
)
static

◆ truncate_file()

static int truncate_file ( int  argc,
char **  argv 
)
static

◆ write_file()

static int write_file ( int  argc,
char **  argv 
)
static

Variable Documentation

◆ shell_fs_commands

const shell_command_t shell_fs_commands[]
Initial value:
= {
{ "fstest", "fs", "fstest confirm", "Test file API in new /VFSTEST directory", fs_test },
{ "ls", "fs", "ls [path]", "List directory", list },
{ "cd", "fs", "cd [path]", "Change current directory", cd },
{ "pwd", "fs", "pwd", "Print current directory", pwd },
{ "mkdir", "fs", "mkdir <path>", "Create directory", mkdir_command },
{ "rmdir", "fs", "rmdir <path>", "Remove empty directory", rmdir_command },
{ "cat", "fs", "cat <file>", "Read file", cat },
{ "stat", "fs", "stat <path>", "File information", stat_file },
{ "load", "fs", "load <file>", "Load into managed buffer", load_file },
{ "create", "fs", "create <file>", "Create empty file", create },
{ "del", "fs", "del <file>", "Delete file", remove_file },
{ "write", "fs", "write <file> <text>", "Replace file contents", write_file },
{ "append", "fs", "append <file> <text>", "Append to existing file", append_file },
{ "truncate", "fs", "truncate <file> <bytes>", "Resize file, zero-fill growth", truncate_file },
{ "cp", "fs", "cp <source> <destination>", "Copy file (no overwrite)", copy },
{ "mv", "fs", "mv <source> <destination>", "Move or rename (no overwrite)", move },
{ "fat12info", "fs", "fat12info", "Volume information", fs_info },
{ 0 }
}
static int rmdir_command(int argc, char **argv)
Definition commands_fs.c:55
static int cat(int argc, char **argv)
Definition commands_fs.c:28
static int append_file(int argc, char **argv)
Definition commands_fs.c:99
static int move(int argc, char **argv)
Definition commands_fs.c:107
static int fs_info(int argc, char **argv)
Definition commands_fs.c:137
static int pwd(int argc, char **argv)
Definition commands_fs.c:63
static int cd(int argc, char **argv)
Definition commands_fs.c:59
static int list(int argc, char **argv)
Definition commands_fs.c:14
static int fs_test(int argc, char **argv)
Definition commands_fs.c:174
static int create(int argc, char **argv)
Definition commands_fs.c:43
static int remove_file(int argc, char **argv)
Definition commands_fs.c:47
static int stat_file(int argc, char **argv)
Definition commands_fs.c:125
static int load_file(int argc, char **argv)
Definition commands_fs.c:146
static int mkdir_command(int argc, char **argv)
Definition commands_fs.c:51
static int copy(int argc, char **argv)
Definition commands_fs.c:103
static int truncate_file(int argc, char **argv)
Definition commands_fs.c:111
static int write_file(int argc, char **argv)
Definition commands_fs.c:95