Class Resources

java.lang.Object
edu.tufts.hrilab.util.resource.Resources

public class Resources extends Object
  • Constructor Details

    • Resources

      public Resources()
  • Method Details

    • createFilepath

      public static String createFilepath(String dir, String filename)
      Helper method to pre-pend dir to filename if the dir/filename combination results in a valid file, otherwise filename is returned. This is a utility method only for loading files from the classpath.
      Parameters:
      dir - directory path
      filename - name of file
      Returns:
    • getResource

      public static URL getResource(String dir, String filename)
      Helper method to get a resource. Attempts to use the dir/filename combination to find a resource, otherwise just the filename is used.
      Parameters:
      dir - directory path
      filename - name of file
      Returns: