I am testing on android 27 emulator and trying to traverse some directories. When I try to traverse /storage/emulated directory, the method listFiles() returns null while there /storage/emulated/0 exists. Here is a testing code: P.S. I have added the proper storage permission in manifest and granted the runti…
Tag: file-permissions
How to check if a PDF is Password Protected or not
I am trying to use iText’s PdfReader to check if a given PDF file is password protected or not, but am getting this exception: Exception in thread “Main Thread” java.lang.NoClassDefFoundError:org/bouncycastle/asn1/ASN1OctetString But when testing the same code against a non-password protecte…
Setting file permissions returns FALSE always
The code: On Ubuntu all 3 calls return false. On my Windows only the 3rd call to setWritable returns false. The target is to create the file/dir so the user (tomcat) and the group will be able to read/write. BUT the file created on Ubuntu without permissions for the group to write. Answer I found the solution…