In my app I have a ListView which I populate with names of files and folders in a directory for my file browser.
I have overrid the getView method so that I can manually set a d开发者_如何学Cifferent icon in each row of the ListView depending on the child's file type, or if it's a directory or not.
Now if I were to check if a path on the sdcard is a directory I'd simply do:
if(new File("/sdcard/folder/path").isDirectory()){
icon.setImageResource(R.drawable.foldericon);
}
But when dealing with FTPFile's that method doesn't seem to work.
Does anybody know how I can achieve the same outcome as the code above but with an FTPFile?
精彩评论