Package ghidra.framework.model
Interface DomainFileFilter
- All Superinterfaces:
DomainFolderFilter
- All Known Implementing Classes:
DefaultDomainFileFilter
DomainFileFilter interface to indicate whether a domain file should be included in a
list or set of domain files. This interface extends DomainFolderFilter which also
controls the following of linked-folders.
Without specific overrides the default behavior:
DomainFolderFilter.ignoreBrokenLinks()(true) Ignores all broken linksDomainFolderFilter.ignoreExternalLinks()(true) Ignores all external linksDomainFolderFilter.ignoreFolderLinks()(false) Will follow folder-linksfollowExternallyLinkedFolders()Based on NOT-DomainFolderFilter.ignoreExternalLinks()AND NOT-DomainFolderFilter.ignoreFolderLinks()
The specific handling of link-files is determined by the consumer of this filter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DomainFileFilterFile filter which accepts all files, including all external file-links, and allows opening/expanding of external folder-links.static final DomainFileFilterFile filter which accepts all files, including all external file-links, but does not allow opening/expanding of external folder-links.static final DomainFileFilterFile filter which allows all internal folders and files.static final DomainFileFilterFile filter which allows all non-linked internal folders and files.Fields inherited from interface ghidra.framework.model.DomainFolderFilter
ALL_FOLDERS_FILTER, ALL_INTERNAL_FOLDERS_FILTER, NON_LINKED_FOLDER_FILTER -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(DomainFile df) Tests whether or not the specified domain file should be included in a domain file list.default booleanCheck if the children of an externally-linked folder should be loaded/processed.Methods inherited from interface ghidra.framework.model.DomainFolderFilter
ignoreBrokenLinks, ignoreExternalLinks, ignoreFolderLinks
-
Field Details
-
ALL_FILES_FILTER
File filter which accepts all files, including all external file-links, and allows opening/expanding of external folder-links. All broken links are ignored. -
ALL_FILES_NO_EXTERNAL_FOLDERS_FILTER
File filter which accepts all files, including all external file-links, but does not allow opening/expanding of external folder-links. All broken links are ignored. -
ALL_INTERNAL_FILES_FILTER
File filter which allows all internal folders and files. All external and broken links are ignored. This filter is useful when selecting a file with an arbitrary content type. If targeting a specific file content type the use ofDefaultDomainFileFiltermay be preferred. -
NON_LINKED_FILE_FILTER
File filter which allows all non-linked internal folders and files. All links are ignored. This filter is useful if code does not handle some of the implications of following links such as:- External repository authentication
- Processing the same project content more than once or lack of support for link-files
DefaultDomainFileFiltermay be preferred.
-
-
Method Details
-
accept
Tests whether or not the specified domain file should be included in a domain file list. Since link-files will also be subject to this constraint the ability to handle or follow such links must be considered.NOTE: File-links have the same
DomainFile.getDomainObjectClass()as the file they refer to, while theirDomainFile.getContentType()is specific to theirLinkHandlerimplementation.- Parameters:
df- The domain file to be tested- Returns:
trueif and only ifdf
-
followExternallyLinkedFolders
default boolean followExternallyLinkedFolders()Check if the children of an externally-linked folder should be loaded/processed.If this method is not implemented the value returned is NOT-
DomainFolderFilter.ignoreExternalLinks()AND NOT-DomainFolderFilter.ignoreFolderLinks().NOTE: Following an external link utilizes the application's active project to retain and external project as one of it's viewed-projects. In the process of accessing a viewed-project the user may be required to authenticate to a remote server.
- Returns:
- true if children of an externally-linked folder should be traversed or displayed (subject to a successful connection to the referenced project or server-based repository).
-