2022-01-04 00:24:39 +00:00
|
|
|
package io.github.applecommander.acx.command;
|
|
|
|
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
2022-01-14 04:03:43 +00:00
|
|
|
import com.webcodepro.applecommander.util.filestreamer.FileTuple;
|
|
|
|
|
2022-01-04 00:24:39 +00:00
|
|
|
import io.github.applecommander.acx.base.ReadWriteDiskCommandWithGlobOptions;
|
|
|
|
import picocli.CommandLine.Command;
|
|
|
|
|
|
|
|
@Command(name = "lock", description = "Lock file(s) on a disk image.")
|
|
|
|
public class LockCommand extends ReadWriteDiskCommandWithGlobOptions {
|
|
|
|
private static Logger LOG = Logger.getLogger(LockCommand.class.getName());
|
|
|
|
|
|
|
|
public void fileHandler(FileTuple tuple) {
|
|
|
|
tuple.fileEntry.setLocked(true);
|
|
|
|
LOG.info(() -> String.format("File '%s' locked.", tuple.fileEntry.getFilename()));
|
|
|
|
}
|
|
|
|
}
|