[Android Assets]: File or Folder?
===

<p>My Asset structure is divided in folders and files. When I open a file I need to know if is a file or folder. I need to know is the asset path I'm accessing if a file or a folder.</p>

<p>I'm trying to access the file through a method I'm implementing.</p>

    public int getFileType (String filepath)
    {
        String PACKAGE_APP_NAME = /com/fake/android/app;
    	File f = new File("file:///android_asset/" + PACKAGE_APP_NAME + "/" + filepath);
    	
    	if (f == null)
    	{
    		Log.e("ResListMaker","File Object Is Null");
    		return -1;
    	}
    	else if (!f.exists())
    	{
    		Log.e("ResListMaker","File Doesn't Exist");
    		return -1;
    	}
    	else if (f.isFile())
    	{
    		Log.e("ResListMaker","Regular File");
    		return 0;
    	}
            else if (f.isDirectory())
    	{
    		Log.e("ResListMaker","Directory");
    		return 1;
    	}
    	else
    	{
    		Log.e("ResListMaker","Unknown type");
    		return -1;
    	}
    }

<p><b>But always return File Doesn't exist. Is the URI path right? Is there other way to know if the asset is file or a folder?</b></p>

<p>Thanks</p>