! Remove a directory * * @param[in,out] r newlib reentrancy struct * @param[in] name Path of directory to remove * * @returns 0 for success * @returns -1 for error */
| 1301 | * @returns -1 for error |
| 1302 | */ |
| 1303 | static int |
| 1304 | archive_rmdir(struct _reent *r, |
| 1305 | const char *name) |
| 1306 | { |
| 1307 | Result rc; |
| 1308 | FS_Path fs_path; |
| 1309 | archive_fsdevice *device = r->deviceData; |
| 1310 | |
| 1311 | /* treat extdata as read-only */ |
| 1312 | if(device->is_extdata) |
| 1313 | { |
| 1314 | r->_errno = ENOTSUP; |
| 1315 | return -1; |
| 1316 | } |
| 1317 | |
| 1318 | fs_path = archive_utf16path(r, name, &device); |
| 1319 | if(fs_path.data == NULL) |
| 1320 | return -1; |
| 1321 | |
| 1322 | rc = FSUSER_DeleteDirectory(device->archive, fs_path); |
| 1323 | if(R_SUCCEEDED(rc)) |
| 1324 | return 0; |
| 1325 | |
| 1326 | r->_errno = archive_translate_error(rc); |
| 1327 | return -1; |
| 1328 | } |
| 1329 | |
| 1330 | Result |
| 1331 | archive_getmtime(const char *name, |
nothing calls this directly
no test coverage detected