Random Access on files in DirAssets

Steven Sparrow

Member
Licensed User
Longtime User
I have a sample data file that I included using the File Manager in basic4android.

If I call file exists using File.Exists(File.DirAssets, "Filename") it returns true.

When I try to open it as a random access file in read-only mode, it throws a "Java.io.FileNotFoundException".

Sample Code:
Dim raf as RandomAccessFile
raf.initialize2(File.DirAssets, "DEMOFILE", True, True) <- Exception

Is this a "feature/bug" in the RandomAccess file library?

As a workaround, I copy the file to the File.DirRootExternal folder.

Thanks
Steve
 
Top