Class: Chef::ChefFS::FileSystem::ChefRepositoryFileSystemDataBagsDir

Inherits:
ChefRepositoryFileSystemEntry show all
Defined in:
lib/chef/chef_fs/file_system/chef_repository_file_system_data_bags_dir.rb

Instance Attribute Summary

Attributes inherited from FileSystemEntry

#file_path

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from ChefRepositoryFileSystemEntry

#chef_object, #children, #data_handler, #minimize, #write, #write_pretty_json, #write_pretty_json=

Methods inherited from FileSystemEntry

#children, #create_child, #delete, #dir?, #exists?, #path_for_printing, #read, #write

Methods inherited from BaseFSDir

#child, #dir?

Methods inherited from BaseFSObject

#chef_object, #child, #children, #compare_to, #create_child, #delete, #dir?, #exists?, #path_for_printing, #read, #root, #write

Constructor Details

#initialize(name, parent, path = nil) ⇒ ChefRepositoryFileSystemDataBagsDir

Returns a new instance of ChefRepositoryFileSystemDataBagsDir.



26
27
28
# File 'lib/chef/chef_fs/file_system/chef_repository_file_system_data_bags_dir.rb', line 26

def initialize(name, parent, path = nil)
  super(name, parent, path, Chef::ChefFS::DataHandler::DataBagItemDataHandler.new)
end

Instance Method Details

#can_have_child?(name, is_dir) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/chef/chef_fs/file_system/chef_repository_file_system_data_bags_dir.rb', line 30

def can_have_child?(name, is_dir)
  is_dir && !name.start_with?('.')
end