ubuntu 12.04 - can not read file from linux system using java -


i trying read/write files on ubuntu 12.04. set permission of directory chmod -r 777 . still when call canread() method on directory returns false.

my directory /root/temp

please me solve problem

code (copied comments):

file xyz = new file("/root/temp");  system.out.println("filename :"+xyz.getpath());  system.out.println("can read :"+xyz.canread());  string[] children = xyz.list();  

children null, output of can read false.

are running program root? not sufficient changing permissions of /root/temp, if not user root wont able "go through" dir /root unless change permissions of dir /root .


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -