return < 0 on error
| 1143 | |
| 1144 | // return < 0 on error |
| 1145 | int 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 |
no outgoing calls
no test coverage detected