1 /* 2 * Copyright (c) 2015 Steve White 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #pragma once 9 10 #include <lib/bio.h> 11 #include <lib/fs.h> 12 13 typedef void *fsfilecookie; 14 15 status_t fat32_mount(bdev_t *dev, fscookie **cookie); 16 status_t fat32_unmount(fscookie *cookie); 17 18 /* file api */ 19 status_t fat32_open_file(fscookie *cookie, const char *path, filecookie **fcookie); 20 ssize_t fat32_read_file(filecookie *fcookie, void *buf, off_t offset, size_t len); 21 status_t fat32_close_file(filecookie *fcookie); 22 status_t fat32_stat_file(filecookie *fcookie, struct file_stat *stat); 23 24