title: [Android Assets]: File or Folder?
body: <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>
  
  <pre><code>public int getFileType (String filepath)
  {
      String PACKAGE_APP_NAME = /com/fake/android/app;
      File f = null; 
  
      try{
          //f = new File(new URI("file:///android_asset/" + JNI_CLASSES + "/" + filepath));   
          f = new File(new URI("file:///android_asset/" + filepath)); 
      }
      catch (URISyntaxException e) {}
  
      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;
      }
  }
  </code></pre>
  
  <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>