org.netbeans.modules.queries/1 1.7.22

org.netbeans.api.queries
Class CollocationQuery

java.lang.Object
  extended by org.netbeans.api.queries.CollocationQuery

public final class CollocationQuery
extends Object

Find out whether some files logically belong in one directory tree, for example as part of a VCS checkout.

See Also:
CollocationQueryImplementation

Method Summary
static boolean areCollocated(File file1, File file2)
          Check whether two files are logically part of one directory tree.
static File findRoot(File file)
          Find a root of a logical tree containing this file, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

areCollocated

public static boolean areCollocated(File file1,
                                    File file2)
Check whether two files are logically part of one directory tree. For example, if both files are stored in CVS, with the same server (CVSROOT) they might be considered collocated. If nothing is known about them, return false.

Parameters:
file1 - one file
file2 - another file
Returns:
true if they are probably part of one logical tree

findRoot

public static File findRoot(File file)
Find a root of a logical tree containing this file, if any.

Parameters:
file - a file on disk
Returns:
an ancestor directory which is the root of a logical tree, if any (else null)

org.netbeans.modules.queries/1 1.7.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.