WKern
Loading...
Searching...
No Matches
filecmds.c File Reference
#include <fileio/fileio.h>
#include <io/kio.h>
#include <mem/kmem.h>

Go to the source code of this file.

Functions

void Rm (const char *argv[], int argc)
 Delete a file from the FAT16 filesystem.
void Mkf (const char *argv[], int argc)
 Create a new empty file on the FAT16 filesystem.
void Writef (const char *argv[], int argc)
 Write data to a file in the FAT16 filesystem from user input.
void Readf (const char *argv[], int argc)
 Read and display contents of a file from the FAT16 filesystem.

Function Documentation

◆ Mkf()

void Mkf ( const char * argv[],
int argc )

Create a new empty file on the FAT16 filesystem.

Usage: mKfile [filename] [ext]

Parameters
argvArray of arguments. argv[1] is the filename, argv[2] is the extension.
argcNumber of arguments.

Definition at line 48 of file filecmds.c.

◆ Readf()

void Readf ( const char * argv[],
int argc )

Read and display contents of a file from the FAT16 filesystem.

Usage: read [filename] [ext]

Parameters
argvArray of arguments. argv[1] is the filename, argv[2] is the extension.
argcNumber of arguments.

Definition at line 108 of file filecmds.c.

◆ Rm()

void Rm ( const char * argv[],
int argc )

Delete a file from the FAT16 filesystem.

Usage: rm [filename] [ext]

Parameters
argvArray of arguments. argv[1] is the filename, argv[2] is the extension.
argcNumber of arguments.

Definition at line 31 of file filecmds.c.

◆ Writef()

void Writef ( const char * argv[],
int argc )

Write data to a file in the FAT16 filesystem from user input.

Prompts the user to input text and writes it to the specified file. Automatically appends an EOF marker (0x1A) at the end.

Usage: write [filename] [ext]

Parameters
argvArray of arguments. argv[1] is the filename, argv[2] is the extension.
argcNumber of arguments.

Definition at line 68 of file filecmds.c.