Other answers are correct. You can open a file through the NDK using FILE
and fopen
, but don’t forget to place a permission for it.
In the Android manifest place:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
More Related Contents:
- Read/write files within a Linux kernel module
- C read file line by line
- When should I use mmap for file access?
- C fopen vs open
- Atomicity of `write(2)` to a local filesystem
- Why is fseek or fflush always required between reading and writing in the update modes?
- Calling a java method from c++ in Android
- Reading the whole text file into a char array in C
- read comma-separated input with `scanf()`
- C write in the middle of a binary file without overwriting any existing content
- What happens if I don’t call fclose() in a C program?
- What is the difference between read() and fread()?
- Read line from file without knowing the line length
- How to pass C structs back and forth to Java code in JNI?
- Why does open() create my file with the wrong permissions?
- Delete a Line from a file in C Language
- Understanding concurrent file writes from multiple processes
- How to print both to stdout and file in C
- Read and write to binary files in C?
- Why is the fgets function deprecated?
- Unable to open a file with fopen()
- Any simple way to log in Android NDK code?
- Keeping a global reference to the JNIEnv environment
- Android read text file from asset folder using C (ndk)
- Reading a file character by character in C
- Read int values from a text file in C
- ftell at a position past 2GB
- Tried and true simple file copying code in C?
- How do I insert and delete some characters in the middle of a file?
- C++ ifstream.getline() significantly slower than Java’s BufferedReader.readLine()?