Returns a path similar to {#constant_to_path} but using dashes instead of
 underscores for the first directory.

 @example
  constant_to_dashed_path('FooBar::Baz') # => "foo-bar/baz.rb"

 @see [#constant_to_path]
556271
def constant_to_dashed_path(constant)
      const_segments = constant.split('::')
      path_segments  = []

      const_segments.each_with_index do |segment, index|
        segment = segment.snake_case

        # Use dashes for the first segment (= top level directory).
        if const_segments.length > 1 and index == 0
          segment = segment.gsub('_', '-')
        end

        path_segments << segment
      end

      return path_segments.join('/') + '.rb'
    end
888882
def path(pathname, relative_to = Pathname.pwd)
      if pathname
        path = Pathname(pathname).relative_path_from(relative_to)
        "`#{path}`"
      else
        ''
      end
    end
615489
def path_to(hash = nil)
      @base_dir ||= File.join(Jekyll::Cache.cache_dir, @name)
      return @base_dir if hash.nil?

      File.join(@base_dir, hash[0..1], hash[2..-1]).freeze
    end
911152
function() {
        var path = this.getHash().substr(1);
        Ember.deprecate('location.hash value is ambiguous. Support for this will be removed soon. When using location: "hash|auto" your hash paths MUST begin with a forward slash. e.g. #/' + path + ' NOT #' + path + '. See http://emberjs.com/guides/deprecations/#toc_location-hash-paths-must-now-include-a-forward-slash-e-g-foo-not-foo', path.length === 0 || path.charAt(0) === '/');
        return path;
      }
945209
def normalize_path(path)
    normalized_path = path.dup
    begin
      mod = nil
      mod ||= normalized_path.gsub!(RULE_2A, '/')

      pair = normalized_path.match(RULE_2B_2C)
      parent, current = pair[1], pair[2] if pair
      if pair && ((parent != '.' && parent != '..') ||
          (current != '.' && current != '..'))
        mod ||= normalized_path.gsub!(
          Regexp.new(
            "/#{Regexp.escape(parent.to_s)}/\\.\\./|" +
            "(/#{Regexp.escape(current.to_s)}/\\.\\.$)"
          ), '/'
        )
      end

      mod ||= normalized_path.gsub!(RULE_2D, '')
      # Non-standard, removes prefixed dotted segments from path.
      mod ||= normalized_path.gsub!(RULE_PREFIXED_PARENT, '/')
    end until mod.nil?

    return normalized_path
  end
1142272
def _preprocessContaminantOutFilePath(outPath):
        
        if '/' in outPath:
            splitPath = outPath.split('/')

        elif '\\' in outPath:
            splitPath = outPath.split('\\')

        else:
            splitPath = [outPath, ]

        if splitPath[-1] == '':
            outputFilename = splitPath[-2]

        else:
            outputFilename = splitPath[-1]

        if '.' in outputFilename:
            outputFilename = outputFilename.split('.')[0]

        return outputFilename
463907
public static String asDirPath(String path) {
		String dirPath = path;
		if (!path.equals(JawrConstant.URL_SEPARATOR)) {
			dirPath = JawrConstant.URL_SEPARATOR + normalizePath(path) + JawrConstant.URL_SEPARATOR;
		}
		return dirPath;
	}
803641
def uri_join(*paths)
      return nil if paths.length == 0
      leadingslash = paths[0][0] == '/' ? '/' : ''
      trailingslash = paths[-1][-1] == '/' ? '/' : ''
      paths.map! { |path| path.sub(/^\/+/, '').sub(/\/+$/, '') }
      leadingslash + paths.join('/') + trailingslash
    end
904788
def path
      temporary = []
      actual_route = nil
      router do |route|
        actual_route = extract_and_format_route(route)
        temporary.push(actual_route) unless temporary.include?(actual_route)
        actual_route
      end
      temporary
    end
878834
def to_full_path(cls, path):
        
        if isinstance(path, SymbolicReference):
            path = path.path
        full_ref_path = path
        if not cls._common_path_default:
            return full_ref_path
        if not path.startswith(cls._common_path_default + "/"):
            full_ref_path = '%s/%s' % (cls._common_path_default, path)
        return full_ref_path
851457
function (path) {
                var absolute = path.charAt(0) === '/', trailingSlash = path.slice(0 - 1) === '/';
                path = normalizeArray(splitPathToArray(path), !absolute).join('/');
                if (!path && !absolute) {
                    path = '.';
                }
                if (path && trailingSlash) {
                    path += '/';
                }
                return (absolute ? '/' : '') + path;
            }
713178
def path
      if @parent
        ::File.join(@parent.path, name)
      else
        if name != '.'
          ::File.join('.', name)
        else
          name
        end
      end
    end
899189
def anti_clobber_dir_path(dir_path, suffix='.d'):
    '''
    '''
    dir_path = os.path.normpath(dir_path)
    parts = dir_path.split(os.sep)

    for index in range(len(parts)):
        test_path = os.sep.join(parts[:index + 1])

        if os.path.isfile(test_path):
            parts[index] += suffix

            return os.sep.join(parts)

    return dir_path
961040
def normalized_path
      @normalized_path ||= begin
        path = self.path.to_s
        if self.scheme == nil && path =~ NORMPATH
          # Relative paths with colons in the first segment are ambiguous.
          path = path.sub(":", "%2F")
        end
        # String#split(delimeter, -1) uses the more strict splitting behavior
        # found by default in Python.
        result = path.strip.split(SLASH, -1).map do |segment|
          Addressable::URI.normalize_component(
            segment,
            Addressable::URI::CharacterClasses::PCHAR
          )
        end.join(SLASH)

        result = URI.normalize_path(result)
        if result.empty? &&
            ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme)
          result = SLASH.dup
        end
        result
      end
      # All normalized values should be UTF-8
      @normalized_path.force_encoding(Encoding::UTF_8) if @normalized_path
      @normalized_path
    end
1232014
def set_as_path_prepend
      arr = []
      match = config_get('route_map', 'set_as_path_prepend', @get_args)
      if arr
        match.each do |line|
          next if line.include?('last-as')
          arr = line.strip.split
        end
      end
      arr
    end
124267
private String findPathToGems() throws FileNotFoundException {
        String[] commandParams = cli.getCommandParams(GEM, ENVIRONMENT);
        List<String> lines = cli.runCmd(rootDirectory, commandParams);
        String path = null;
        if (!lines.isEmpty()) {
            path = lines.get(0) + fileSeparator + CACHE;
            if (new File(path).isDirectory() == false) {
                throw new FileNotFoundException();
            }
        }
        return path;
    }
413493
def computed_path(context)
      @_path ||= case @path
      when String, Hash
        @path
      when Symbol
        context.public_send(@path) # todo
      when Proc
        context.instance_exec(&@path)
      else
        raise ArgumentError,
          "Expected one of String, Symbol, or Proc, " \
          "got #{@path.class}"
      end
    end