Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symbolic Link Creation in Android Within an Application's Asset Directory

I can't seem to find a solid answer for this specific question.

I'm trying to create a symbolic link programmatically of a directory in my assets folder in another location within the same application's asset directory. Essentially, I'm looking to do the same thing as what the createSymbolicLink method of Java.nio.Files would do.

Is there an available way of doing this with the Android SDK? If not, is it possible in the NDK?

like image 654
SBerg413 Avatar asked Dec 19 '22 08:12

SBerg413


1 Answers

For Android API 21 and above, just use:

Os.symlink(originalFilePath,symLinkFilePath);
like image 74
android developer Avatar answered Jan 05 '23 16:01

android developer