站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

CollocationQuery (NetBeans General Queries API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.api.queries
Class CollocationQuery

java.lang.Object
  extended byorg.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)

 

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