Move .java

net.minecraft.util.filefix.operations.Move (record, 18 lines): record with 2 components. members: relative, fix. imports: FileFixUtil, UpgradeProgress.

net.minecraft.util.filefix.operationsrecord18 linescommon620 B

Implements

API Surface (2)

Move relative(final String sourceFolder, final String targetFolder)
void fix(final Path baseDirectory, final UpgradeProgress upgradeProgress)

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

Move.java18 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.filefix.operations;
2
3
import java.io.IOException;
4
import java.nio.file.Path;
5
import net.minecraft.util.filefix.FileFixUtil;
6
import net.minecraft.util.worldupdate.UpgradeProgress;
7
8
public record Move(String from, String to) implements FileFixOperation {
9
	public Move relative(final String sourceFolder, final String targetFolder) {
10
		return new Move(sourceFolder + "/" + this.from, targetFolder + "/" + this.to);
11
	}
12
13
	@Override
14
	public void fix(final Path baseDirectory, final UpgradeProgress upgradeProgress) throws IOException {
15
		FileFixUtil.moveFile(baseDirectory, this.from, this.to);
16
	}
17
}
18

Decompiled Minecraft 26.3 source of Move (net/minecraft/util/filefix/operations/Move.java) with Mojang official mappings, stored verbatim on the site.