Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
808 B
26 lines
808 B
2 years ago
|
package org.openrs2.archive.cache.finder
|
||
|
|
||
|
import com.github.ajalt.clikt.core.CliktCommand
|
||
|
import com.github.ajalt.clikt.parameters.arguments.argument
|
||
|
import com.github.ajalt.clikt.parameters.arguments.default
|
||
|
import com.github.ajalt.clikt.parameters.types.inputStream
|
||
|
import com.github.ajalt.clikt.parameters.types.path
|
||
|
import java.nio.file.Path
|
||
|
|
||
|
public class ExtractCommand : CliktCommand(name = "extract") {
|
||
|
private val input by argument().inputStream()
|
||
|
private val output by argument().path(
|
||
|
mustExist = false,
|
||
|
canBeFile = false,
|
||
|
canBeDir = true,
|
||
|
mustBeReadable = true,
|
||
|
mustBeWritable = true
|
||
|
).default(Path.of("."))
|
||
|
|
||
|
override fun run() {
|
||
|
CacheFinderExtractor(input).use { extractor ->
|
||
|
extractor.extract(output)
|
||
|
}
|
||
|
}
|
||
|
}
|