android - No files detected on FTP server -
i'm running ftp server, contains file in root directory: "/". program able connect , login server , able change root directory. when try list name of files , print out single file located, gives me error saying: "attempt read null array". here code:
ftpclient = new ftpclient(); log.d("loginactivity", "ftp"); ftpclient.connect("xxx.xxx.x.xx", xx); boolean connected = ftpclient.isconnected(); if(connected){ log.d("loginactivity", "connected: true"); } boolean loggedin = ftpclient.login("name", "password"); if(loggedin){ log.d("loginactivity", "loggedin: true"); } boolean founddirectory = ftpclient.changeworkingdirectory("/"); if(founddirectory){ log.d("loginactivity", "directory found: true"); } string[] files = ftpclient.listnames("/"); log.d("loginactivity", files[0]);
how come no files found, when know there 1 located in rootdirectory?
Comments
Post a Comment