Files
KatauOS/include/vfs.h
T

28 lines
774 B
C

#ifndef VFS_H
#define VFS_H
#define ISO_9660_BUFFER_LENGTH 2048
#include <stdbool.h>
#include "../include/atapi.h"
#include "../include/lib9660.h"
extern l9660_fs* global_fs;
extern l9660_dir* root_dir;
bool read_sector_callback(l9660_fs *fs, void *buf, uint32_t sector);
void mount_fs();
void list_files(l9660_dir *dir);
size_t vfs_read_file(l9660_file *file, uint8_t* buffer);
size_t vfs_read_file_length(l9660_file *file, uint8_t* buffer, size_t length);
void test_iso9660();
int vfs_read_file_by_path(const char* path, uint8_t** buffer);
void follow_path(const char* path, l9660_file* file, l9660_dir* dir);
l9660_status find_name_for_sector(char* name_buf, int buf_len, l9660_dir* parent_dir, uint32_t child_sector);
bool is_root_dir(l9660_dir* dir);
#endif