Table of Contents

Class PhysicalPackageFile

Namespace
NuGet.Packaging
Assembly
Chocolatey.NuGet.Packaging.dll
public class PhysicalPackageFile : IPackageFile
Inheritance
PhysicalPackageFile
Implements
Inherited Members

Constructors

PhysicalPackageFile()

public PhysicalPackageFile()

PhysicalPackageFile(MemoryStream)

public PhysicalPackageFile(MemoryStream stream)

Parameters

stream MemoryStream

Properties

EffectivePath

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

public 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

public DateTimeOffset LastWriteTime { get; }

Property Value

DateTimeOffset

NuGetFramework

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

public NuGetFramework NuGetFramework { get; }

Property Value

NuGetFramework

Path

Gets the full path of the file inside the package.

public string Path { get; }

Property Value

string

SourcePath

Path on disk

public string SourcePath { get; set; }

Property Value

string

TargetFramework

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

public FrameworkName TargetFramework { get; }

Property Value

FrameworkName

TargetPath

Path in package

public string TargetPath { get; set; }

Property Value

string

Methods

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetStream()

public Stream GetStream()

Returns

Stream

ToString()

public override string ToString()

Returns

string