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

SharabilityQuery (NetBeans General Queries API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.queries
Class SharabilityQuery

java.lang.Object
  extended byorg.netbeans.api.queries.SharabilityQuery

public final class SharabilityQuery
extends Object

Determine whether files should be shared (for example in a VCS) or are intended to be unshared. Likely to be of use only to a VCS filesystem.

This query can be considered to obsolete FileObject.setImportant(boolean). Unlike that method, the information is pulled by the VCS filesystem on demand, which may be more reliable than ensuring that the information is pushed by a project type (or other implementor) eagerly.

See Also:
SharabilityQueryImplementation

Field Summary
static int MIXED
          Constant indicating that a directory is sharable but files and directories recursively contained in it may or may not be sharable.
static int NOT_SHARABLE
          Constant indicating that the file or directory is not sharable.
static int SHARABLE
          Constant indicating that the file or directory is sharable.
static int UNKNOWN
          Constant indicating that nothing is known about whether a given file should be considered sharable or not.
 
Method Summary
static int getSharability(File file)
          Check whether an existing file is sharable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
Constant indicating that nothing is known about whether a given file should be considered sharable or not. A client should therefore behave in the safest way it can.

See Also:
Constant Field Values

SHARABLE

public static final int SHARABLE
Constant indicating that the file or directory is sharable. In the case of a directory, this means that all files and directories recursively contained in this directory are also sharable.

See Also:
Constant Field Values

NOT_SHARABLE

public static final int NOT_SHARABLE
Constant indicating that the file or directory is not sharable. In the case of a directory, this means that all files and directories recursively contained in this directory are also not sharable.

See Also:
Constant Field Values

MIXED

public static final int MIXED
Constant indicating that a directory is sharable but files and directories recursively contained in it may or may not be sharable. A client interested in children of this directory should explicitly ask about each in turn.

See Also:
Constant Field Values
Method Detail

getSharability

public static int getSharability(File file)
Check whether an existing file is sharable.

Parameters:
file - a file or directory (may or may not already exist)
Returns:
one of the constants in this class

 

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