java - how to List the mounted files in local directory programmatically? -


i'm mounting network using samba sharing. after mounting when open , see file browser network files shown in mounted folder. when call directory.listfiles(); it's failing show files programmatically.

this code...

main.java;

string mountfilepath1 = "//10.0.0.18/beagleboneblack/jacksongs"; try{             process su = runtime.getruntime().exec("su");             dataoutputstream outputstream = new dataoutputstream(su.getoutputstream());             outputstream.writebytes("umount /data/test/ \n  chmod -r 777  /data/test/ \n mount -t cifs -o user=root,pass=guest,nounix,noserverino " + mountfilepath1 + "   /data/test/\n");             outputstream.flush();             try {                 thread.sleep(1000);             } catch (interruptedexception e) {                 e.printstacktrace();             }         }catch(ioexception e){} 

after when check /data/test directory files shown... when call

  file directory = new file("/data/test/");   file[] fileslist = directory.listfiles(); 

it's not showing exception , crashing app.. log details are...

06-04 11:15:34.866    4188-4188/? e/cutils-trace﹕ error opening trace file: permission denied (13) 06-04 11:15:35.056    4188-4188/? e/memtrack﹕ couldn't load memtrack module (no such file or directory) 06-04 11:15:35.056    4188-4188/? e/android.os.debug﹕ failed load memtrack module: -2 06-04 11:15:41.716      479-509/? e/inputdispatcher﹕ channel '422e9b30 amitechnologies.products.multizoneplayer/view.mainactivity (server)' ~ channel unrecoverably broken , disposed! 06-04 11:15:53.316      479-502/? e/javabinder﹕ !!! failed binder transaction !!! 06-04 11:15:54.486    4558-4558/? e/cutils-trace﹕ error opening trace file: permission denied (13) 06-04 11:15:54.616    4558-4558/? e/memtrack﹕ couldn't load memtrack module (no such file or directory) 06-04 11:15:54.616    4558-4558/? e/android.os.debug﹕ failed load memtrack module: -2 06-04 11:15:55.326      891-891/? e/networkscheduler.schedulerreceiver﹕ invalid parameter app 06-04 11:15:55.326      891-891/? e/networkscheduler.schedulerreceiver﹕ invalid package name : perhaps didn't include pendingintent in extras? 06-04 11:15:57.036    4733-4733/? e/cutils-trace﹕ error opening trace file: no such file or directory (2) 06-04 11:15:57.176    4733-4733/? e/memtrack﹕ couldn't load memtrack module (no such file or directory) 06-04 11:15:57.176    4733-4733/? e/android.os.debug﹕ failed load memtrack module: -2 


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -