Can't create file in DCIM folder on Oculus

I’m doing an app in Unity for the Oculus Quest 2. I have been able to read & write to the private app folder using Application.persistentDataPath() to find the folder path. The following works:

string path = Application.persistentDataPath + “/test.csv”;

try
{
StreamWriter writer = new StreamWriter(path, true);
writer.WriteLine(“Test”);
writer.Close();
}
catch
{
// failure code
}

However, I have not been able to find out how/where the DCIM folder is so I can read & write to that folder.

Can someone help me find the folder or what the function is to find the folder?

have you tried if write works into download folder? (i dont remember dcim path now, but if its visible in explorer, try that)
/sdcard/Download/

also, which unity version, and whats your android api version in player settings?
there used to be one filesystem issue where Android 9 (API 28) works, but Android 10 didnt…(so can try if api 28 works)

There is a LOT of very non-Unity-specific knowledge to know about Android permissions and filesystems with this question. I don’t even know how to reason about if what you want to do is even possible trivially. Here’s an example of some important reading:

1 Like