public interface CollocationQueryImplementation2
This should be treated as a heuristic, useful when deciding whether to use absolute or relative links between path locations.
The file names might refer to nonexistent files. A provider may or may not be able to say anything useful about them in this case.
File names passed to this query will already have been normalized according to
the semantics of FileUtil.normalizeFile(java.io.File)
.
Threading note: implementors should avoid acquiring locks that might be held
by other threads. Generally treat this interface similarly to SPIs in
org.openide.filesystems
with respect to threading semantics.
CollocationQuery
Modifier and Type | Method and Description |
---|---|
boolean |
areCollocated(URI file1,
URI file2)
Check whether two files are logically part of one directory tree.
|
URI |
findRoot(URI file)
Find a root of a logical tree containing this file, if any.
|
boolean areCollocated(URI file1, URI file2)
CVSROOT
) they might be considered collocated.
If they are to be collocated their absolute paths must share a
prefix directory, i.e. they must be located in the same filesystem root.
If nothing is known about them, return false.file1
- one filefile2
- another fileURI findRoot(URI file)
file
- a file on disk (must be an absolute URI)