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
IsDirectory
True for a folder the package must contain (it may be empty).
public bool IsDirectory { get; }
Property Value
IsExecutable
True when the file must be executable on Linux (a script).
public bool IsExecutable { get; }
Property Value
RelativePath
The path inside the package, with forward slashes.
public string RelativePath { get; }
Property Value
Methods
Directory(string)
A folder.
public static ServerPackageFile Directory(string relativePath)
Parameters
relativePathstring
Returns
Exceptions
- ArgumentException
relativePathis 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
Returns
Exceptions
- ArgumentException
relativePathis 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.