FileType getFileType(final String fileName) {
    // deviate from Android CPP implementation here. Assume fileName is a complete path
    // rather than limited to just asset namespace
    File assetFile = new File(fileName);
    if (!assetFile.exists()) {
      return FileType.kFileTypeNonexistent;
    } else if (assetFile.isFile()) {
      return FileType.kFileTypeRegular;
    } else if (assetFile.isDirectory()) {
      return kFileTypeDirectory;
    }
    return FileType.kFileTypeNonexistent;
//      Asset pAsset = null;
//
//      /*
//       * Open the asset.  This is less efficient than simply finding the
//       * file, but it's not too bad (we don't uncompress or mmap data until
//       * the first read() call).
//       */
//      pAsset = open(fileName, Asset.AccessMode.ACCESS_STREAMING);
//      // delete pAsset;
//
//      if (pAsset == null) {
//          return FileType.kFileTypeNonexistent;
//      } else {
//          return FileType.kFileTypeRegular;
//      }
  }
FileType getFileType(final String fileName) {
    
    
    File assetFile = new File(fileName);
    if (!assetFile.exists()) {
      return FileType.kFileTypeNonexistent;
    } else if (assetFile.isFile()) {
      return FileType.kFileTypeRegular;
    } else if (assetFile.isDirectory()) {
      return kFileTypeDirectory;
    }
    return FileType.kFileTypeNonexistent;











  }
FileType getFileType ( final String fileName ) { // deviate from Android CPP implementation here. Assume fileName is a complete path // rather than limited to just asset namespace File assetFile = new File ( fileName ) ; if ( ! assetFile . exists ( ) ) { return FileType . kFileTypeNonexistent ; } else if ( assetFile . isFile ( ) ) { return FileType . kFileTypeRegular ; } else if ( assetFile . isDirectory ( ) ) { return kFileTypeDirectory ; } return FileType . kFileTypeNonexistent ; //      Asset pAsset = null; // //      /* //       * Open the asset.  This is less efficient than simply finding the //       * file, but it's not too bad (we don't uncompress or mmap data until //       * the first read() call). //       */ //      pAsset = open(fileName, Asset.AccessMode.ACCESS_STREAMING); //      // delete pAsset; // //      if (pAsset == null) { //          return FileType.kFileTypeNonexistent; //      } else { //          return FileType.kFileTypeRegular; //      } }
/*
Get the type of a file
/ * Get the type of a file