开发者

Android Development: How To Check If FTPFile Is a Directory?

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜