OpenAPI 1.0

com.aquafold.openapi.compare
Interface AQFileComparator


public interface AQFileComparator

This interface provides a mechanism for simple file comparison. Files can be compared based on the following criteria:

This interface does not support text comparison. Please use AQComparator interface for this purpose.


Method Summary
 AQFileDifferences compare(Object leftFolder, Object rightFolder)
          Compares files contained in the specified folders, including sub-folders, according to the set criteria.
 AQFileDifferences compare(Object leftFolder, Object rightFolder, boolean recursive)
          Compares files contained in the specified folders, according to the set criteria.
 void setIgnoreCase(boolean ignore)
          Determines whether comparison operation should ignore the file name case.
 void setIgnoreContent(boolean ignore)
          Determines whether comparison operation should ignore the file content.
 void setIgnoreTimestamp(boolean ignore)
          Determines whether comparison operation should ignore the file timestamp.
 void setTimestampTolerance(int ms)
          Determines the maximum difference between two timetamps to be considered equal.
 

Method Detail

setIgnoreCase

void setIgnoreCase(boolean ignore)
Determines whether comparison operation should ignore the file name case. Default value of this parameter is true.

Parameters:
ignore -

setIgnoreTimestamp

void setIgnoreTimestamp(boolean ignore)
Determines whether comparison operation should ignore the file timestamp. Default value of this parameter is false (the timestamp is being checked).

Parameters:
ignore -

setIgnoreContent

void setIgnoreContent(boolean ignore)
Determines whether comparison operation should ignore the file content. Default value of this parameter is false (file content and length are being checked).

Parameters:
ignore -

setTimestampTolerance

void setTimestampTolerance(int ms)
Determines the maximum difference between two timetamps to be considered equal. Default value is 0.

Parameters:
ms - Time difference in milliseconds.

compare

AQFileDifferences compare(Object leftFolder,
                          Object rightFolder)
Compares files contained in the specified folders, including sub-folders, according to the set criteria. Comparison ignores the system or hidden files. This method can be called only once on the object.

Parameters:
leftFolder - Left folder name or a File object.
rightFolder - Right folder name or a File object.

compare

AQFileDifferences compare(Object leftFolder,
                          Object rightFolder,
                          boolean recursive)
Compares files contained in the specified folders, according to the set criteria. Comparison ignores the system or hidden files. This method can be called only once on the object.

Parameters:
leftFolder - Left folder name or a File object.
rightFolder - Right folder name or a File object.
recursive - When true, the comparison will also include files in sub-folders.

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.