txt: ## installation.md
  class CompUnit::Repository::Installation
  
  CompUnit::Repository::Installation
  
  ```raku
  class CompUnit::Repository::Installation
      does CompUnit::Repository::Locally
      does CompUnit::Repository::Installable
      { }
  
  ```
  
  A [`CompUnit::Repository`](/type/CompUnit/Repository) implementation backed by the filesystem, but uses an internal storage format to:
  
  * Handle case sensitivity issues on filesystems that may conflict as a [`CompUnit::Repository::FileSystem`](/type/CompUnit/Repository/FileSystem).
  * Handle allowable filename issues (e.g. unicode) on filesystems that don't support them.
  * Allow multiple distributions with the same name, but with different `ver` and/or `auth` and/or `api` values, to be installed and separately accessible in a single repository.
  * Enable faster module loading by providing module precompilation.
  
  Because of the internal storage format the usual way to add a distribution is not by copying files but by calling [CompUnit::Repository::Installation#method\_install](/type/CompUnit/Repository/Installation#method_install).
  
  # [Methods](#class_CompUnit::Repository::Installation "go to top of document")[§](#Methods "direct link")
  
  ## [method install](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_install "direct link")
  
  ```raku
  method install(Distribution $distribution, Bool :$force)
  ```
  
  Copies modules into a special location so that they can be loaded afterwards.
  
  `:$force` will allow installing over an existing distribution that has the same `name`, `auth`, `api`, and `ver`. Otherwise such a situation will result in [`Failure`](/type/Failure).
  
  ```raku
  my $inst-repo = CompUnit::RepositoryRegistry.repository-for-name("site");
  my $dist = Distribution::Path.new(...);
  $inst-repo.install($dist);
  ```
  
  ## [method uninstall](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_uninstall "direct link")
  
  ```raku
  method uninstall(Distribution $distribution)
  ```
  
  Removes the `$distribution` from the repository. `$distribution` should be obtained from the repository it is being removed from:
  
  ```raku
  my $inst-repo = CompUnit::RepositoryRegistry.repository-for-name("site");
  my $dist = $inst-repo.candidates("Acme::Unused").head;
  $inst-repo.uninstall($dist);
  ```
  
  ## [method candidates](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_candidates "direct link")
  
  ```raku
  multi method candidates(Str:D $name, :$auth, :$ver, :$api)
  multi method candidates(CompUnit::DependencySpecification $spec)
  ```
  
  Return all distributions that contain a module matching the specified `$name`, `auth`, `ver`, and `api`.
  
  ```raku
  my $inst-repo-path = CompUnit::RepositoryRegistry.repository-for-name("perl").prefix;
  my $inst-repo = CompUnit::Repository::Installation.new(prefix => $inst-repo-path);
  my $dist = $inst-repo.candidates("Test").head;
  say "Test version: " ~ $dist.meta<ver>; # OUTPUT: «6.d␤»
  ```
  
  ## [method files](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_files "direct link")
  
  ```raku
  multi method files(Str:D $name, :$auth, :$ver, :$api)
  multi method files(CompUnit::DependencySpecification $spec)
  ```
  
  Return all distributions that match the specified `auth` `ver` and `api`, and contains a non-module file matching the specified `$name`.
  
  ```raku
  # assuming Zef is installed to the default location...
  my $repo = CompUnit::RepositoryRegistry.repository-for-name("site");
  
  say $repo.files('bin/zef', :ver<419.0+>).head.<name>              // "Nada"; # OUTPUT: «Nada␤»
  say $repo.files('resources/config.txt', :ver<419.0+>).head.<name> // "Nada"; # OUTPUT: «Nada␤»
  
  say $repo.files('bin/zef', :ver<0.4.0+>).head.<name>;                        # OUTPUT: «zef␤»
  say $repo.files('resources/config.txt', :ver<0.4.0+>).head.<name>;           # OUTPUT: «zef␤»
  ```
  
  ## [method resolve](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_resolve "direct link")
  
  ```raku
  method resolve(CompUnit::DependencySpecification $spec --> CompUnit:D)
  ```
  
  Returns a [`CompUnit`](/type/CompUnit) mapped to the highest version distribution matching `$spec` from the first repository in the repository chain that contains any version of a distribution matching `$spec`.
  
  ## [method need](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_need "direct link")
  
  ```raku
  method need(
      CompUnit::DependencySpecification $spec,
      CompUnit::PrecompilationRepository $precomp = self.precomp-repository(),
      CompUnit::PrecompilationStore :@precomp-stores = self!precomp-stores(),
      --> CompUnit:D)
  
  ```
  
  Loads and returns a [`CompUnit`](/type/CompUnit) which is mapped to the highest version distribution matching `$spec` from the first repository in the repository chain that contains any version of a distribution matching `$spec`.
  
  ## [method load](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_load "direct link")
  
  ```raku
  method load(IO::Path:D $file --> CompUnit:D)
  ```
  
  Load the `$file` and return a [`CompUnit`](/type/CompUnit) object representing it.
  
  ## [method loaded](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_loaded "direct link")
  
  ```raku
  method loaded(--> Iterable:D)
  ```
  
  Returns all [`CompUnit`](/type/CompUnit)s this repository has loaded.
  
  ## [method short-id](#class_CompUnit::Repository::Installation "go to top of document")[§](#method_short-id "direct link")
  
  ```raku
  method short-id()
  ```
  
  Returns the repo short-id, which for this repository is `inst`.
  