| 57 | } |
| 58 | |
| 59 | Result GetApplicationSupportPath(const char* application_name, char* path, uint32_t path_len) |
| 60 | { |
| 61 | const char* const DeviceMount = dmSysGetUserPersistentDataRoot(); |
| 62 | if (DeviceMount && 0 < strlen(DeviceMount)) |
| 63 | { |
| 64 | if (dmStrlCpy(path, DeviceMount, path_len) >= path_len) |
| 65 | return RESULT_INVAL; |
| 66 | if (dmStrlCat(path, "/", path_len) >= path_len) |
| 67 | return RESULT_INVAL; |
| 68 | } |
| 69 | else |
| 70 | { |
| 71 | path[0] = '\0'; |
| 72 | } |
| 73 | if (dmStrlCat(path, ".", path_len) >= path_len) |
| 74 | return RESULT_INVAL; |
| 75 | if (dmStrlCat(path, application_name, path_len) >= path_len) |
| 76 | return RESULT_INVAL; |
| 77 | Result r = Mkdir(path, 0755); |
| 78 | if (r == RESULT_EXIST) |
| 79 | return RESULT_OK; |
| 80 | else |
| 81 | return r; |
| 82 | } |
| 83 | |
| 84 | Result OpenURL(const char* url, const char* target) |
| 85 | { |