MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / createSymLink

Function createSymLink

file.c:1145–1154  ·  view source on GitHub ↗

return < 0 on error

Source from the content-addressed store, hash-verified

1143
1144// return < 0 on error
1145int createSymLink(const char *store_location, const char *target) {
1146 SceUID fd = sceIoOpen(store_location, SCE_O_WRONLY | SCE_O_CREAT, 0777);
1147 if (fd < 0) {
1148 return VITASHELL_ERROR_SYMLINK_INTERNAL;
1149 }
1150 sceIoWrite(fd, (void*) &symlink_header_bytes, SYMLINK_HEADER_SIZE);
1151 sceIoWrite(fd, (void*) target, strnlen(target, MAX_PATH_LENGTH));
1152 sceIoClose(fd);
1153 return 0;
1154}
1155
1156// get directory path from filename
1157// result has slash at the end

Callers 2

create_recent_symlinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected