Sha256: 3692495cd8533eabf32ec91e34f24680152ca398fae0438b4152145ae2876dbb

Contents?: true

Size: 404 Bytes

Versions: 49

Compression:

Stored size: 404 Bytes

Contents

module Bake

  def self.findDirOfFileToRoot(dir, filename)
    if !File.exists?(dir)
      Bake.formatter.printError("Error: #{dir} does not exist")
      ExitHelper.exit(1)
    end
    loop do
      completeName = dir + "/" + filename
      return dir if File.exist?(completeName)
      newDir = File.dirname(dir)
      return nil if newDir == dir
      dir = newDir
    end
  end

end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
bake-toolkit-2.49.0 lib/common/options/finder.rb
bake-toolkit-2.48.3 lib/common/options/finder.rb
bake-toolkit-2.48.2 lib/common/options/finder.rb
bake-toolkit-2.48.1 lib/common/options/finder.rb
bake-toolkit-2.48.0 lib/common/options/finder.rb
bake-toolkit-2.47.1 lib/common/options/finder.rb
bake-toolkit-2.47.0 lib/common/options/finder.rb
bake-toolkit-2.46.0 lib/common/options/finder.rb
bake-toolkit-2.45.0 lib/common/options/finder.rb