0
我正在使用以下代碼爲android中的文件設置完整權限。 但它不工作。我無法找到原因。請幫助。在android中設置文件的完整權限
File mypath=new File(directory, filename+ ".png");
Runtime.getRuntime().exec("chmod 777 " + mypath);
System.out.println("FileExecute " + mypath.canExecute());
System.out.println("FileRead " + mypath.canRead());
System.out.println("FileWrite " + mypath.canWrite());
System.out.println("FileExists " + mypath.exists());
System.out.println("FileisFile " + mypath.isFile());
我得到每個輸出爲'假'。有沒有其他方法來設置完整的權限。
的System.out.println( 「FileisFile」 + mypath中.isFile());請注意,它也是假的。但目錄和文件是正確的 – Kamalone 2012-03-26 08:33:34
檢查文件瀏覽器中的文件.. – Navdroid 2012-03-26 08:41:35