method files

Documentation for method files assembled from the following types:

class CompUnit::Repository::FileSystem

From CompUnit::Repository::FileSystem

(CompUnit::Repository::FileSystem) method files

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.

# assuming one is cloned into the zef git repository... 
my $repo = CompUnit::Repository::FileSystem.new(prefix => $*CWD);
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␤» 

class CompUnit::Repository::Installation

From CompUnit::Repository::Installation

(CompUnit::Repository::Installation) method files

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.

# 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␤»