OpenTAP 9.34
API Reference
OpenTap.Package.FilePackageRepository Class Reference

Implements a IPackageRepository that queries a local directory for OpenTAP packages. More...

Inheritance diagram for OpenTap.Package.FilePackageRepository:
OpenTap.Package.IPackageRepository

Public Member Functions

 FilePackageRepository (string path)
 Constructs a FilePackageRepository for a directory.
 
void DownloadPackage (IPackageIdentifier package, string destination, CancellationToken cancellationToken)
 Downloads a package from this repository to a file.
 
string[] GetPackageNames (CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get all names of packages.
 
PackageVersion[] GetPackageVersions (string packageName, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Returns all package version information about a package.
 
PackageDef[] GetPackages (PackageSpecifier pid, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 This returns the latest version of a package that matches a number of specified parameters. If multiple packages have that same version number they all will be returned.
 
PackageDef[] CheckForUpdates (IPackageIdentifier[] packages, CancellationToken cancellationToken)
 Returns a list of all packages that have an updated version.
 
override string ToString ()
 Creates a display friendly string of this.
 
- Public Member Functions inherited from OpenTap.Package.IPackageRepository

Properties

string Url [get, set]
 The url of the repository.
 
- Properties inherited from OpenTap.Package.IPackageRepository

Detailed Description

Implements a IPackageRepository that queries a local directory for OpenTAP packages.

Constructor & Destructor Documentation

◆ FilePackageRepository()

OpenTap.Package.FilePackageRepository.FilePackageRepository ( string path)
inline

Constructs a FilePackageRepository for a directory.

Parameters
pathRelative or absolute path or URI to a directory or a file. If file, the repository will be the directory containing the file
Exceptions
NotSupportedExceptionPath is not a valid file package repository

Member Function Documentation

◆ CheckForUpdates()

PackageDef[] OpenTap.Package.FilePackageRepository.CheckForUpdates ( IPackageIdentifier[] packages,
CancellationToken cancellationToken )
inline

Returns a list of all packages that have an updated version.

Parameters
packages
cancellationTokenA cancellation token that can be used to cancel the download.
Returns
An array of package definitions PackageDef.

Implements OpenTap.Package.IPackageRepository.

◆ DownloadPackage()

void OpenTap.Package.FilePackageRepository.DownloadPackage ( IPackageIdentifier package,
string destination,
CancellationToken cancellationToken )
inline

Downloads a package from this repository to a file.

Parameters
packageThe package to download.
destinationThe destination path where the package should be stored.
cancellationTokenA cancellation token that can be used to cancel the download.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageNames()

string[] OpenTap.Package.FilePackageRepository.GetPackageNames ( CancellationToken cancellationToken,
params IPackageIdentifier[] compatibleWith )
inline

Get all names of packages.

Parameters
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package names.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackages()

PackageDef[] OpenTap.Package.FilePackageRepository.GetPackages ( PackageSpecifier package,
CancellationToken cancellationToken,
params IPackageIdentifier[] compatibleWith )
inline

This returns the latest version of a package that matches a number of specified parameters. If multiple packages have that same version number they all will be returned.

Parameters
packageA package identifier. If not specified, packages with any name will be returned.
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package definitions PackageDef.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageVersions()

PackageVersion[] OpenTap.Package.FilePackageRepository.GetPackageVersions ( string packageName,
CancellationToken cancellationToken,
params IPackageIdentifier[] compatibleWith )
inline

Returns all package version information about a package.

Parameters
packageNameThe name package to retrieve version info about.
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package versions.

Implements OpenTap.Package.IPackageRepository.

OpenTAP 9.34 API built Wed Jul 1 2026 09:21:15