Class VpkLink
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Links to a file inside of a VPK, as copied by Source 2 Viewer, such as vpk:steam:730/game/csgo/pak01_dir.vpk:models/chicken/chicken.vmdl_c. Packages inside of packages are separated the same way, such as vpk:outer_dir.vpk:maps/inner.vpk:models/file.vmdl_c.
public static class VpkLinkInheritance
object ← VpkLink
Fields
Prefix
Scheme of the links.
public const string Prefix = "vpk:"Field Value
string
Methods
Create(IEnumerable<string>)
Builds a link from the paths of the packages it goes through, outermost first, optionally followed by the path inside of the innermost one.
public static string Create(IEnumerable<string> paths)Parameters
paths IEnumerable<string>
Returns
string
EscapePath(string)
Escapes a package or inner path for a link, so that VpkLink.Parse(string) reads it back unchanged.
public static string EscapePath(string path)Parameters
path string
Returns
string
IsVpkLink(string)
Whether the text is a link.
public static bool IsVpkLink(string text)Parameters
text string
Returns
bool
Parse(string)
Splits a link into the paths of the packages it goes through, and the path inside of the innermost one.
public static (List<string> PackagePaths, string InnerPath) Parse(string link)Parameters
link string
Returns
(List<string> PackagePaths, string InnerPath)
The package paths with the outermost first (empty when the link does not point inside of a package), and the path inside of the innermost package, or the whole path when there is no package.

