class File

Public Class Methods

chef_cookbook?(path)
Alias for: cookbook?
cookbook?(path) click to toggle source

Returns true or false if the given path contains a Chef Cookbook

@param [#to_s] path

path of directory to reflect on

@return [Boolean]

# File lib/berkshelf/core_ext/file.rb, line 9
def cookbook?(path)
  File.exist?(File.join(path, "metadata.json")) || File.exist?(File.join(path, "metadata.rb"))
end
Also aliased as: chef_cookbook?