Operating System
|
below define the api for filesystem. they are low level api. More...
#include <stdint.h>
#include "../FATMacro.h"
#include "../filesystem.h"
#include "../fsutilities.h"
#include "../../include/mystring.h"
#include "fsErrorCode.h"
#include "../../include/utilities.h"
#include "../../include/stdio.h"
Go to the source code of this file.
Macros | |
#define | ERR_NOT_FOUND -1 |
file not found More... | |
#define | TYPE_FLDR 0 |
type file directory More... | |
#define | TYPE_FILE 1 |
type file More... | |
#define | TYPE_DOC 2 |
type (reserved) document for file system More... | |
Functions | |
static FAT_ITEM * | __get_root_dir () |
static int16_t | __has_next_item (const FAT_ITEM *p) |
static int16_t | __has_prev_item (const FAT_ITEM *p) |
static FAT_ITEM * | __next_item (FAT_ITEM *p) |
static FAT_ITEM * | __prev_item (FAT_ITEM *p) |
static int16_t | __FAT_item_type (const FAT_ITEM *p) |
static int16_t | __FAT_showable_item (const FAT_ITEM *p) |
static FAT_ITEM * | __jmp_into_dir (const FAT_ITEM *p) |
static int16_t | __rm_this_file (FAT_ITEM *p) |
static int16_t | __run_this_file (FAT_ITEM *p) |
static int16_t | __load_program (const char *targetFilename) |
static void | __print_file_cluster_list (const FAT_ITEM *pfat) |
below define the api for filesystem. they are low level api.
Definition in file fsapi.h.
#define ERR_NOT_FOUND -1 |
file not found
Definition at line 13 of file fsErrorCode.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
try and load the program. search from the root directory, trying to match filename. if file is found, try runing it by calling __run_this_file.
targetFilename | the file to load. without '.ext'. no longer than 5 bytes. |
|
inlinestatic |
|
inlinestatic |
try and delete a fat item (file or directory)
|
inlinestatic |
helper function. no need to directly call it. check whether it is run-able. load EVERY-SECTOR into memory.