Advertisement
Guest User

Untitled

a guest
Nov 8th, 2011
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public boolean checkuserexist(String userid)
  2. {
  3. boolean returned = false;
  4. try {
  5. ftp.connect(ftp_host);
  6. ftp.enterLocalPassiveMode();
  7. ftp.login(ftp_username,ftp_password);
  8.  
  9. String[] files = ftp.listNames();
  10.  
  11. for(int i=0;i<files.length;i++)
  12. {
  13. String getFile = files[i].toString();
  14. if(getFile==userid)
  15. {
  16. returned=true;
  17. }
  18. }
  19. ftp.disconnect();
  20. } catch (IOException e) {
  21. // TODO Auto-generated catch block
  22. e.printStackTrace();
  23. }
  24. return returned;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement