saker.build Documentation TaskDoc JavaDoc Packages
public final class CommonTaskContentDescriptors
Utility class containing common content descriptors which can be used for reporting file dependencies.

The static singleton instances can be used for reporting file dependencies.

Fields
public static final ContentDescriptor
Content descriptor that signals that the task doesn't care about the modifications made to the associated file.
public static final ContentDescriptor
Content descriptor that expects the associated path to be a directory.
public static final ContentDescriptor
Content descriptor that expects the associated path to be a file.
public static final ContentDescriptor
Content descriptor that expects the associated path to not be a directory.
public static final ContentDescriptor
Content descriptor that expects the associated path to be not a file.
public static final ContentDescriptor
Content descriptor that expects the associated file or directory to not exist.
public static final ContentDescriptor
Content descriptor that expects the associated file or directory to exist, but doesn't specify other requirements on it.
public static final ContentDescriptor DONT_CARE
Content descriptor that signals that the task doesn't care about the modifications made to the associated file.

The ContentDescriptor.isChanged(ContentDescriptor) method always returns false.

This content descriptor can be used when the task wants to avoid DeltaType.INPUT_FILE_ADDITION deltas to trigger task reinvocation.

public static final ContentDescriptor IS_DIRECTORY
Content descriptor that expects the associated path to be a directory. That is, it must exist, and must be a directory.
public static final ContentDescriptor IS_FILE
Content descriptor that expects the associated path to be a file. That is, it must exist, and mustn't be a directory.
Content descriptor that expects the associated path to not be a directory. That is, it may be a file, or not exist.
public static final ContentDescriptor IS_NOT_FILE
Content descriptor that expects the associated path to be not a file. That is, it may be a directory, or not exist.
public static final ContentDescriptor NOT_PRESENT
Content descriptor that expects the associated file or directory to not exist.

If the descriptor to compare is non-null and is other than NonExistentContentDescriptor.INSTANCE, then it will return true.

public static final ContentDescriptor PRESENT
Content descriptor that expects the associated file or directory to exist, but doesn't specify other requirements on it.

If the descriptor to compare is null or equals NonExistentContentDescriptor.INSTANCE, then it will return true.