Class: Chef::ChefFS::FileSystem::BaseFSDir

Inherits:
BaseFSObject show all
Defined in:
lib/chef/chef_fs/file_system/base_fs_dir.rb

Instance Attribute Summary

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from BaseFSObject

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

Constructor Details

#initialize(name, parent) ⇒ BaseFSDir

Returns a new instance of BaseFSDir.



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

def initialize(name, parent)
  super
end

Instance Method Details

#can_have_child?(name, is_dir) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 34

def can_have_child?(name, is_dir)
  true
end

#dir?Boolean

Returns:

  • (Boolean)


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

def dir?
  true
end

#empty?Boolean

An empty children array is an empty dir

Returns:

  • (Boolean)


39
40
41
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 39

def empty?
  children.empty?
end