class UCF::ManagedDirectory

A ManagedDirectory acts as the interface to a set of (possibly) managed files within it and also reserves the directory name in the Container namespace.

Once a ManagedDirectory is registered in a Container then only it can be used to write to its contents.

Public Class Methods

new(name, required = false) → ManagedDirectory click to toggle source

Create a new ManagedDirectory with the supplied name and whether it is required to exist or not. Any ManagedFile or ManagedDirectory objects that are within this directory can also be given if required.

Calls superclass method
# File lib/ucf/entries/directory.rb, line 52
def initialize(name, required = false, entries = [])
  super(name, required)


Public Instance Methods

verify! click to toggle source

Verify this ManagedDirectory for correctness. ManagedFiles registered within it are verified recursively.

A MalformedUCFError is raised if it does not pass verification.

Calls superclass method
# File lib/ucf/entries/directory.rb, line 65
def verify!
  @files.values.each { |f| f.verify! }