刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);
    }
}