Code example for File

Methods: exists, length

0
   * 
   * @param path 
   * @return true if exists and non-empty, false otherwise 
   */ 
  protected boolean pathExists(final String path) {
    File file = new File(path);
    return file.exists() && file.length() > 0;
  } 
 
  /** 
   * Load bitmap 
   * 
   * @return bitmap 
   */ 
  protected Bitmap load() {
    if (pathExists(path))
      return decode(); 
    else 
      return null; 
  }