MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _remove_symlink

Function _remove_symlink

platform/android/os_android.cpp:61–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59const char *OS_Android::ANDROID_EXEC_PATH = "apk";
60
61String _remove_symlink(const String &dir) {
62 // Workaround for Android 6.0+ using a symlink.
63 // Save the current directory.
64 char current_dir_name[2048];
65 getcwd(current_dir_name, 2048);
66 // Change directory to the external data directory.
67 chdir(dir.utf8().get_data());
68 // Get the actual directory without the potential symlink.
69 char dir_name_without_symlink[2048];
70 getcwd(dir_name_without_symlink, 2048);
71 // Convert back to a String.
72 String dir_without_symlink(dir_name_without_symlink);
73 // Restore original current directory.
74 chdir(current_dir_name);
75 return dir_without_symlink;
76}
77
78#ifdef TOOLS_ENABLED
79_FORCE_INLINE_ static GameViewPlugin *_get_game_view_plugin() {

Callers 3

get_user_data_dirMethod · 0.85
get_cache_pathMethod · 0.85
get_temp_pathMethod · 0.85

Calls 2

get_dataMethod · 0.45
utf8Method · 0.45

Tested by

no test coverage detected