0
我想讓所有文件夾的根訪問權最大。 這個順序是否正確並且始終可用並存在?Android:此方法是否始終可用並存在?
File ffile = new File(Environment.getRootDirectory().getParent());
// return "/"
// "/" out root access to all folders
我想讓所有文件夾的根訪問權最大。 這個順序是否正確並且始終可用並存在?Android:此方法是否始終可用並存在?
File ffile = new File(Environment.getRootDirectory().getParent());
// return "/"
// "/" out root access to all folders
您可以調用getRootDirectory()來獲取系統目錄。如果你想要所有文件夾的真正的根,它總是「/」。所以只是做new File("/");
'File file = new file(「/」)'對我來說錯誤,:|爲什麼? – grizzly
什麼是錯誤? –
'新的文件(「/」);'現在好的工作:)。這種方法'新的文件(「/」);'始終可用並存在於所有API android? – grizzly