ServerPackFile

expect class ServerPackFile

A ServerPackFile represents a source-destination-combination of two files/directories. The source is the file/directory, usually in the modpack, whilst the destination is the file to which the source is supposed to be copied to in the server pack.

Author

Griefed

actual class ServerPackFile

A ServerPackFile represents a source-destination-combination of two files/directories. The source is the file/directory, usually in the modpack, whilst the destination is the file to which the source is supposed to be copied to in the server pack.

Author

Griefed

Constructors

Link copied to clipboard
constructor(sourceFile: File, destinationFile: File)

Construct a new ServerPackFile from two File-objects, a source and a destination.

constructor(sourcePath: Path, destinationPath: Path)

Construct a new ServerPackFile from two Path-objects, a source and a destination.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
expect fun copy()

Copy the file to the server pack.

actual fun copy()

Copy this ServerPackFiles source to the destination. Already existing files are replaced. When the source-file is a directory, then the destination-directory is created as an empty directory. Any contents in the source-directory are NOT copied over to the destination-directory. See copyRecursively for an example on how to copy entire directories.