Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.util.io

pack-priv Class BrokenLinkedFileNameBasedFileFinder

extends Object
implements FileFinder
Class Inheritance
All Implemented Interfaces
org.jabref.logic.util.io.FileFinder
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.ArrayList, .List, .Set, java.util.stream.Collectors, .Stream, org.jabref.model.entry.BibEntry, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Only the interface FileFinder is visible outside jablib. All the implementations of FileFinder are package-private, and are instantiated via FileFinders

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public List<Path>
findAssociatedFiles(@NonNull BibEntry entry, @NonNull List<Path> directories, List<String> extensions)

Implements org.jabref.logic.util.io.FileFinder.findAssociatedFiles.

Finds all files in the given directories that are probably associated with the given entries and have one of the passed extensions.

private static List<Path>
findAssociatedFilesInDirectory(Path directory, Set<String> brokenLinkedFileNames, List<String> extensions)

private static @NonNull Set<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

BrokenLinkedFileNameBasedFileFinderback to summary
pack-priv BrokenLinkedFileNameBasedFileFinder()

Method Detail

findAssociatedFilesback to summary
public List<Path> findAssociatedFiles(@NonNull BibEntry entry, @NonNull List<Path> directories, List<String> extensions) throws IOException

Implements org.jabref.logic.util.io.FileFinder.findAssociatedFiles.

Doc from org.jabref.logic.util.io.FileFinder.findAssociatedFiles.

Finds all files in the given directories that are probably associated with the given entries and have one of the passed extensions.

Annotations
@Override
findAssociatedFilesInDirectoryback to summary
private static List<Path> findAssociatedFilesInDirectory(Path directory, Set<String> brokenLinkedFileNames, List<String> extensions) throws IOException
getBrokenLinkedFileNamesback to summary
private static @NonNull Set<String> getBrokenLinkedFileNames(@NonNull BibEntry entry, @NonNull List<Path> directories)