Class ServerPackFile
-
- All Implemented Interfaces:
public final class ServerPackFileA 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.
Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private final FilesourceFileprivate final PathsourcePathprivate final FiledestinationFileprivate final PathdestinationPath
-
Constructor Summary
Constructors Constructor Description ServerPackFile(File sourceFile, File destinationFile)Construct a new ServerPackFile from two File-objects, a source and a destination. ServerPackFile(Path sourcePath, Path destinationPath)Construct a new ServerPackFile from two Path-objects, a source and a destination.
-
Method Summary
Modifier and Type Method Description final FilegetSourceFile()final PathgetSourcePath()final FilegetDestinationFile()final PathgetDestinationPath()final Filecopy(Boolean overwrite)Copy this ServerPackFiles source to the destination. -
-
Method Detail
-
getSourceFile
final File getSourceFile()
-
getSourcePath
final Path getSourcePath()
-
getDestinationFile
final File getDestinationFile()
-
getDestinationPath
final Path getDestinationPath()
-
copy
final File copy(Boolean overwrite)
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.
This method specifically does NOT copy recursively, because we would potentially copy previously EXCLUDED files, too. We do not want that. At all.
-
-
-
-