-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfs.h
38 lines (32 loc) · 1.19 KB
/
fs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Filesystem functions
*
* Copyright (C) 2017 Jonathan Neuschäfer <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program, in the file LICENSE.GPLv2.
*/
#ifndef _FS_H
#define _FS_H
#include <stddef.h>
#include <fs_defs.h>
extern char sdcard_path[FS_MAX_MOUNTPATH_SIZE];
extern void fs_init(void);
extern void fs_deinit(void);
extern const char *FS_strerror(int error);
extern void mount_sdcard(void);
extern void unmount_sdcard(void);
extern size_t get_file_size(const char *filename, const char *what);
extern int read_file_into_buffer(const char *filename, u8 *buffer, size_t size,
const char *what);
extern int write_buffer_into_file(const char *filename, u8 *buffer, size_t size);
#endif