I am writing instrumentation tests for my app and want to create a 
temporary folder to store some files. However, I dont want to do that in 
the targetContext but rather in the test context.

In other words:
File dir = getInstrumentation().*getTargetContext()*.getDir("directory", 
MODE_WORLD_READABLE);  // Works, but this creates the folder in the target 
app.

File dir = getInstrumentation().*getContext()*.getDir("directory", 
MODE_WORLD_READABLE);  // Does not work, the exists() returns false.

Thoughts?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to