Get the file path to output the html based on the file being
 built.  The output path is relative to where guard is being run.

 @param file [String] path to file being built
 @return [String] path to file where output should be written
761404
def get_output(file)
      file_dir = File.dirname(file)
      file_name = File.basename(file).split('.')[0..-2].join('.')

      file_name = "#{file_name}.js" if file_name.match("\.js").nil?

      file_dir = file_dir.gsub(Regexp.new("#{@options[:input]}(\/){0,1}"), '') if @options[:input]
      file_dir = File.join(@options[:output], file_dir) if @options[:output]

      if file_dir == ''
        file_name
      else
        File.join(file_dir, file_name)
      end
    end
242836
def to_htmls(files, options = {})
      FileUtils.chdir(File.expand_path(options[:base_dir]))
      files.each_with_index do |file, index|
        puts "FYI: process file #{index + 1} of #{files.size} : #{file}"
        to_html(file, options)
      end
    end
1361605
def clean_path_to(file, options = {})
      # Allow individual calls to this method to specify additional custom load paths to consider
      if options[:load_paths]
        [options[:load_paths]].each do |root|
          if File.exist?("#{root}/#{file}")
            return Pathname.new("#{root}/#{file}")
          end
        end
      end
      if File.exist?(file)
        if Pathname.new(file).absolute?
          Pathname.new(file)
        else
          Pathname.new("#{Pathname.pwd}/#{file}")
        end
      # Is it a relative reference within a list file?
      elsif @last_opened_list_dir && File.exist?("#{@last_opened_list_dir}/#{file}")
        Pathname.new("#{@last_opened_list_dir}/#{file}")
      # Is it a relative reference to the current base directory?
      elsif File.exist?("#{base_directory}/#{file}")
        Pathname.new("#{base_directory}/#{file}")
      # Is it a path relative to Origen.root?
      elsif File.exist?("#{Origen.root}/#{file}")
        Pathname.new("#{Origen.root}/#{file}")
      # Is it a path relative to the current directory?
      elsif current_directory && File.exist?("#{current_directory}/#{file}")
        Pathname.new("#{current_directory}/#{file}")
      # Is it a path relative to the current plugin's Origen.root?
      elsif Origen.app.plugins.current && File.exist?("#{Origen.app.plugins.current.root}/#{file}")
        Pathname.new("#{Origen.app.plugins.current.root}/#{file}")
      elsif options[:default_dir]
        m = all_matches(file, options)
        if m
          Pathname.new(m)
        else
          if options[:allow_missing]
            return nil
          else
            fail "Can't find: #{file}"
          end
        end
      else
        if options[:allow_missing]
          return nil
        else
          fail "Can't find: #{file}"
        end
      end
    end
76976
function get_rels_path(file) {
	var n = file.lastIndexOf("/");
	return file.slice(0,n+1) + '_rels/' + file.slice(n+1) + ".rels";
}
847264
def rel_path(*file_path):
        '''
        
        '''
        if hasattr(sys, 'frozen'):
            if file_path[0] == '__file__':
                return sys.executable
            return os.path.join(os.path.dirname(sys.executable), *file_path)
        else:
            try:
                main_file = AppBuilder.main_file
            except AttributeError:
                # The first call setting up the instance
                main_file = inspect.stack()[1][1]
            if file_path[0] == '__file__':
                return os.path.realpath(main_file)
            return os.path.join(os.path.dirname(main_file), *file_path)
197195
public static String getPathToChild(Resource file, Resource dir) {
	if (dir == null || !file.getResourceProvider().getScheme().equals(dir.getResourceProvider().getScheme())) return null;
	boolean isFile = file.isFile();
	String str = "/";
	while (file != null) {
	    if (file.equals(dir)) {
		if (isFile) return str.substring(0, str.length() - 1);
		return str;
	    }
	    str = "/" + file.getName() + str;
	    file = file.getParentResource();
	}
	return null;
    }
81975
def target_dir( f = nil )
      if File.exists?( config_file_path )
        form_file_name( target_dir_from_config, f )
      else
        form_file_name( File.join( ::Rails.root.to_s, 'public/docs' ), f )
      end
    end
1340201
function(file, options) {
		file = this.absPath(file);
		var cwd = (options && options.cwd) || '';
		if (file.substring(0, cwd.length) == cwd) {
			file = file.substring(cwd.length);
			if (file.charAt(0) != '/') {
				file = '/' + file;
			}
		}

		return file;
	}
1266660
def markup
      # Use display_path if defined, otherwise use output_path in url
      display_path = @options['display_path'] || @options['output_path']

      @html = @assets.map do |asset|
        klass = JAPR::Template.klass(asset.filename)
        html = klass.new(display_path, asset.filename).html unless klass.nil?

        html
      end.join
    end
841292
def output_path
      Pathname.new File.join(Massimo.config.output_path, url.sub(/^#{Regexp.escape(Massimo.config.base_url)}/, ''))
    end
10713
def process_result
      require 'sass'

      if @options[:recursive]
        process_directory
        return
      end

      super
      input = @options[:input]
      if File.directory?(input)
        raise "Error: '#{input.path}' is a directory (did you mean to use --recursive?)"
      end
      output = @options[:output]
      output = input if @options[:in_place]
      process_file(input, output)
    end
2906
private String getPathRelativeToSourceSet(File file) {
    Path absolutePath = Paths.get(file.getAbsolutePath());
    Path basePath = Paths.get(task.getProject().file("src").getAbsolutePath() + File.separator + getSourceSetNameFromFile(file));
    return basePath.relativize(absolutePath).toString();
  }
808320
function getOutputFile(file, outputDir) {
  const fileName = path.basename(file).replace('.scss', '.css');
  return path.join(outputDir, fileName);
}
596981
function File(file, options) {
  file = file || {};
  this.file = file;
  this.options = file.options || options || {};
  this.type = this.file.type;
  this.origPath = file.origPath;

  // Record path change
  var history = file.path ? [file.path] : file.history;
  this.history = history || [];

  this.cwd = file.cwd || process.cwd();
  this.base = file.base || this.cwd;

  // Stat = files stats object
  this.stat = file.stat || null;
  this._isFile = true;
}
1204979
def file_match(file)
      raise ArgumentError, "Filename cannot be nil" if file.nil?
      { filename: file, matched: file, line: 1, column: 1 }
    end
1251268
def jimfile=(file)
      @jimfile = file.is_a?(Pathname) ? file.read : file
      # look for old jimfile
      if @jimfile =~ /^\/\//
        logger.warn "You're Jimfile is in a deprecated format. Run `jim update_jimfile` to convert it."
        parse_old_jimfile
      else
        parse_jimfile
      end
      @jimfile
    end
314552
def output_dir
      output_dir = @config.output_dir.nil? ? Dir.getwd : @config.output_dir
      FileUtils.mkdir_p(output_dir) unless ::File.directory?(output_dir)
      output_dir
    end