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

Go to the source code of this file.

Functions

void Fat16RemoveFile (const char *filename, const char *ext)
 Remove a file from the FAT16 filesystem.

Function Documentation

◆ Fat16RemoveFile()

void Fat16RemoveFile ( const char * filename,
const char * ext )

Remove a file from the FAT16 filesystem.

Removes a file from the FAT16 root directory and frees clusters.

This function searches the FAT16 root directory for a file matching the specified filename and extension. If found, it marks the directory entry as deleted and frees all associated FAT clusters by clearing their entries in the FAT table.

Parameters
filenameThe 8-character filename (without extension).
extThe 3-character file extension.
Note
The function assumes the FAT16 filesystem structure is accessible through the global fat16 variable.

Definition at line 38 of file rmfile.c.