|
XenevaOS
|
#include <Fs/Fat/Fat.h>#include <Fs/Fat/FatFile.h>#include <Fs/vdisk.h>#include <Fs/vfs.h>#include <Mm/pmmngr.h>#include <Mm/vmmngr.h>#include <string.h>#include <aucon.h>#include <ctype.h>#include <_null.h>#include <Drivers/uart.h>#include <Mm/kmalloc.h>#include <Hal/AA64/aa64lowlevel.h>
Variables | |
| bool | _vfs_debug_on |
| uint8_t FatCheckDotCount | ( | char * | filename | ) |
FatClearCluster – clears a cluster to 0
| cluster | – cluster to clear |
| uint16_t FatFormatDate | ( | ) |
| uint16_t FatFormatTime | ( | ) |
| void FatFromDosToFilename | ( | char * | filename, |
| char * | dirfname | ||
| ) |
any '\'s in path ?
nope, must be in root directory, search it
found file ?
unable to find
go to next character after first '\'
get pathname
if another '\' or end of line is reached, we are done
copy character
open subdirectory or file
search root dir – open pathname
search a sub directory instead for pathname
found directory or file?
find next '\'
found file?
unable to find
FatRead – read just 4kb portion of a file
| file | – file structure pointer |
| buf | – pointer to buffer to store the content |
| void FatToDOSFilename | ( | const char * | filename, |
| char * | fname, | ||
| unsigned int | fname_length | ||
| ) |
FatToDOSFilename – converts a given filename to MSDOS file name format
| filename | – filename for conversion |
| fname | – pointer to the buffer to store the conversion |
| fname_length | – manly 11 buffer[0-8] – filename, buffer[9-11] – file extension |
|
extern |
|
extern |
|
extern |
BSD 2-Clause License
Copyright (c) 2023-2024, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.