package jnpf.dmsService.search.file; import lombok.Getter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @Getter public class DmsTemporarySearchFile implements AutoCloseable { private final Path path; private final String fileName; private final String mimeType; public DmsTemporarySearchFile(Path path, String fileName, String mimeType) { this.path = path; this.fileName = fileName; this.mimeType = mimeType; } @Override public void close() throws IOException { Files.deleteIfExists(path); } }