MCPcopy Create free account
hub / github.com/Atmosphere-NX/Atmosphere / CreateFile

Function CreateFile

fusee/program/source/fs/fusee_fs_api.cpp:144–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 Result CreateFile(const char *path, s64 size) {
145 /* Create the file. */
146 FIL fp;
147 R_TRY(TranslateFatFsError(f_open(std::addressof(fp), path, FA_CREATE_NEW | FA_READ | FA_WRITE)));
148
149 /* Ensure that we close the file when we're done with it. */
150 ON_SCOPE_EXIT { f_close(std::addressof(fp)); };
151
152 /* Expand the file. */
153 R_TRY(TranslateFatFsError(f_expand(std::addressof(fp), size, 1)));
154
155 R_SUCCEED();
156 }
157
158 Result CreateDirectory(const char *path) {
159 R_RETURN(TranslateFatFsError(f_mkdir(path)));

Callers 11

ScopedFileMethod · 0.50
ScopedFileMethod · 0.50
OpenDebugLogFileMethod · 0.50
SaveCheatTogglesMethod · 0.50
ProcessRequestMethod · 0.50
InitializeDebugLogFunction · 0.50
SaveFatalErrorContextFunction · 0.50
LoadWarmbootFirmwareFunction · 0.50
DoFsTestsFunction · 0.50

Calls 4

TranslateFatFsErrorFunction · 0.70
f_openFunction · 0.50
f_closeFunction · 0.50
f_expandFunction · 0.50

Tested by 1

DoFsTestsFunction · 0.40