files
ErrorsCollection

files

Synthesised documentation from type/CompUnit/Repository/FileSystem type/CompUnit/Repository/Installation

From type/CompUnit/Repository/FileSystem

See Original text in context

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

From type/CompUnit/Repository/Installation

See Original text in context

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