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

Function archive_unlink

libctru/source/archive_dev.c:862–880  ·  view source on GitHub ↗

! Unlink a file * * @param[in,out] r newlib reentrancy struct * @param[in] name Path of file to unlink * * @returns 0 for success * @returns -1 for error */

Source from the content-addressed store, hash-verified

860 * @returns -1 for error
861 */
862static int
863archive_unlink(struct _reent *r,
864 const char *name)
865{
866 Result rc;
867 FS_Path fs_path;
868 archive_fsdevice *device = r->deviceData;
869
870 fs_path = archive_utf16path(r, name, &device);
871 if(fs_path.data == NULL)
872 return -1;
873
874 rc = FSUSER_DeleteFile(device->archive, fs_path);
875 if(R_SUCCEEDED(rc))
876 return 0;
877
878 r->_errno = archive_translate_error(rc);
879 return -1;
880}
881
882/*! Change current working directory
883 *

Callers

nothing calls this directly

Calls 3

archive_utf16pathFunction · 0.85
FSUSER_DeleteFileFunction · 0.85
archive_translate_errorFunction · 0.85

Tested by

no test coverage detected