use of nl.knaw.huygens.timbuctoo.v5.filestorage.implementations.filesystem.dto.FileSystemCachedFile in project timbuctoo by HuygensING.
the class FileSystemFileStorage method getFile.
@Override
public Optional<CachedFile> getFile(String token) throws IOException {
CachedFile cachedFile = null;
FileInfo fileInfo = this.fileInfo.getData().getItems().get(token);
if (fileInfo != null) {
cachedFile = new FileSystemCachedFile(fileInfo.getMediaType(), fileInfo.getName(), new File(dir, token));
}
return Optional.ofNullable(cachedFile);
}
Aggregations