Android: Is this method always available and present?

38 views Asked by At

I want to make the most out root access to all folders. this order is correct and always available and present?

File ffile = new File(Environment.getRootDirectory().getParent());
// return "/"
// "/" out root access to all folders
1

There are 1 answers

2
Gabe Sechan On BEST ANSWER

You call getRootDirectory() to get the system directory. If you want the true root of all folders, it's always just "/". So just do new File("/");