MCPcopy Create free account
hub / github.com/devkitPro/libctru / archive_dirclose

Function archive_dirclose

libctru/source/archive_dev.c:1172–1188  ·  view source on GitHub ↗

! Close an open directory * * @param[in,out] r newlib reentrancy struct * @param[in] dirState Pointer to open directory state * * @returns 0 for success * @returns -1 for error */

Source from the content-addressed store, hash-verified

1170 * @returns -1 for error
1171 */
1172static int
1173archive_dirclose(struct _reent *r,
1174 DIR_ITER *dirState)
1175{
1176 Result rc;
1177
1178 /* get pointer to our data */
1179 archive_dir_t *dir = (archive_dir_t*)(dirState->dirStruct);
1180
1181 /* close the directory */
1182 rc = FSDIR_Close(dir->fd);
1183 if(R_SUCCEEDED(rc))
1184 return 0;
1185
1186 r->_errno = archive_translate_error(rc);
1187 return -1;
1188}
1189
1190/*! Get filesystem statistics for the SD card
1191 *

Callers

nothing calls this directly

Calls 2

FSDIR_CloseFunction · 0.85
archive_translate_errorFunction · 0.85

Tested by

no test coverage detected