Class ServerPackageFile

Namespace
Unity.Multiplayer.Core

One file (or folder) of a server package, relative to the package folder.

public sealed class ServerPackageFile
Inheritance
ServerPackageFile
Inherited Members

Properties

Contents

The text (LF line endings, UTF-8 without a byte order mark); null for a folder.

public string Contents { get; }

Property Value

string

IsDirectory

True for a folder the package must contain (it may be empty).

public bool IsDirectory { get; }

Property Value

bool

IsExecutable

True when the file must be executable on Linux (a script).

public bool IsExecutable { get; }

Property Value

bool

RelativePath

The path inside the package, with forward slashes.

public string RelativePath { get; }

Property Value

string

Methods

Directory(string)

A folder.

public static ServerPackageFile Directory(string relativePath)

Parameters

relativePath string

Returns

ServerPackageFile

Exceptions

ArgumentException

relativePath is empty, rooted, uses backslashes or climbs out.

Text(string, string, bool)

A text file.

public static ServerPackageFile Text(string relativePath, string contents, bool executable = false)

Parameters

relativePath string
contents string
executable bool

Returns

ServerPackageFile

Exceptions

ArgumentException

relativePath is empty, rooted, uses backslashes or climbs out.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.