We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4098b02 commit aba27c7Copy full SHA for aba27c7
2 files changed
arm9/include/fs.h
@@ -13,6 +13,9 @@ const char* GetWorkDir();
13
/** Checks if there is enough space free on the SD card **/
14
bool DebugCheckFreeSpace(size_t required);
15
16
+/** Checks path exists */
17
+bool FileExists(const char* path);
18
+
19
/** Opens existing files */
20
bool FileOpen(const char* path);
21
bool DebugFileOpen(const char* path);
arm9/source/fs.c
@@ -48,6 +48,14 @@ bool DebugCheckFreeSpace(size_t required)
48
return true;
49
}
50
51
+bool FileExists(const char* path)
52
+{
53
+ FILINFO fno;
54
55
+ return f_stat(path, &fno) == FR_OK;
56
+}
57
58
59
bool FileOpen(const char* path)
60
{
61
unsigned flags = FA_READ | FA_WRITE | FA_OPEN_EXISTING;
0 commit comments