package net.mkonrad.synes.util;

import java.io.File;

public class FileTools
{
  /**
   * Find a file in an array of possible folders
   * 
   * Taken from the JCollider demo
   *  
   * @author Hanns Holger Rutz
   * 
   * @param fileName
   * @param folders
   * @return
   */
  public static File findFile( String fileName, String[] folders )
  {
    File f;
  
    for( int i = 0; i < folders.length; i++ ) {
      f = new File( folders[ i ], fileName );
      if( f.exists() ) return f;
    }
    return null;
  }
}
