Table of Contents

Interface IPackageFile

Namespace
NuGet.Packaging
Assembly
Chocolatey.NuGet.Packaging.dll
public interface IPackageFile

Properties

EffectivePath

Gets the path that excludes the root folder (content/lib/tools) and framework folder (if present).

string EffectivePath { get; }

Property Value

string

Examples

If a package has the Path as 'content[net40]\scripts\jQuery.js', the EffectivePath will be 'scripts\jQuery.js'.

If it is 'tools\init.ps1', the EffectivePath will be 'init.ps1'.

LastWriteTime

DateTimeOffset LastWriteTime { get; }

Property Value

DateTimeOffset

NuGetFramework

NuGetFramework object representing this package file's target framework. Use this instead of TargetFramework.

NuGetFramework NuGetFramework { get; }

Property Value

NuGetFramework

Path

Gets the full path of the file inside the package.

string Path { get; }

Property Value

string

TargetFramework

FrameworkName object representing this package file's target framework. Deprecated. Must be null on net5.0 and greater.

[Obsolete("Use NuGetFramework instead. This property will be null for any frameworks net5.0 or above.")]
FrameworkName TargetFramework { get; }

Property Value

FrameworkName

Methods

GetStream()

Stream GetStream()

Returns

Stream