txt: ## distribution.md
  role Distribution
  
  Distribution
  
  ```raku
  role Distribution { }
  ```
  
  This role is an interface for objects that provide API access mapping META6 data to the files it represents. Objects that fulfill the `Distribution` role can be read by e.g. [`CompUnit::Repository::Installation`](/type/CompUnit/Repository/Installation). Generally a `Distribution` provides read access to a set of modules and metadata. These may be backed by the filesystem ([`Distribution::Path`](/type/Distribution/Path), [`Distribution::Hash`](/type/Distribution/Hash)) but could also read from an e.g. tar file or socket.
  
  # [Required Methods](#role_Distribution "go to top of document")[§](#Required_Methods "direct link")
  
  ## [method meta](#role_Distribution "go to top of document")[§](#method_meta "direct link")
  
  ```raku
  method meta(--> Hash:D) { ... }
  ```
  
  Returns a Hash with the representation of the metadata. Please note that an actual `META6.json` file does not need to exist, just a representation in that format.
  
  ## [method content](#role_Distribution "go to top of document")[§](#method_content "direct link")
  
  ```raku
  method content($name-path --> IO::Handle:D) { ... }
  ```
  
  Returns an [`IO::Handle`](/type/IO/Handle) to the file represented by `$name-path`. `$name-path` is a relative path as it would be found in the metadata such as `lib/Foo.rakumod` or `resources/foo.txt`.
  
  # [Typegraph](# "go to top of document")[§](#typegraphrelations "direct link")
  
  Type relations for `Distribution`
  
  
  
  raku-type-graph
  
  
  
  Distribution
  Distribution
  
  
  Distribution::Locally
  Distribution::Locally
  
  
  Distribution::Locally->Distribution
  
  
  
  Mu
  Mu
  
  
  Any
  Any
  
  
  Any->Mu
  
  
  
  Distribution::Path
  Distribution::Path
  
  
  Distribution::Path->Distribution::Locally
  
  
  
  Distribution::Path->Any
  
  
  
  Distribution::Hash
  Distribution::Hash
  
  
  Distribution::Hash->Distribution::Locally
  
  
  
  Distribution::Hash->Any
  
  [Expand chart above](/assets/typegraphs/Distribution.svg)
  