def initialize_copy(source)
      super

      @files = {}
      @directories = {}
      @parent = nil

      source.directories.map(&:dup).each do |new_directory|
        add_directory(new_directory)
      end

      source.files.map(&:dup).each do |new_file|
        add_file(new_file)
      end
    end
def initialize_copy(source)
      super

      @files = {}
      @directories = {}
      @parent = nil

      source.directories.map(&:dup).each do |new_directory|
        add_directory(new_directory)
      end

      source.files.map(&:dup).each do |new_file|
        add_file(new_file)
      end
    end
@!attribute [r] name
   @return [String] the directory name

 @!attribute [r] mode
   @return [Fixnum] the directory mode

 @!attribute [rw] parent
   @return [Directory] the directory's parent


 Creates a new +Directory+

 @param name [String] the directory name
 @param mode [Fixnum] the directory mode


 Reset +parent+ and clone +files+ and +directories+ when calling +dup+ or
 +clone+ on a +Directory+

 @param source [Directory]