Optional compareCompares files by size. Defaults to 'false'.
Usually one of compareSize or compareContent options has to be activated. Otherwise files are compared by name disregarding size or content.
Optional compareCompares files by content. Defaults to 'false'.
Usually one of compareSize or compareContent options has to be activated. Otherwise files are compared by name disregarding size or content.
Optional compareCompares files by date of modification (stat.mtime). Defaults to 'false'.
Also see dateTolerance.
Optional dateTwo files are considered to have the same date if the difference between their modification dates fits within date tolerance. Defaults to 1000 ms.
Optional compareCompares entries by symlink. Defaults to 'false'.
If this option is enabled two entries must have the same type in order to be considered equal. They have to be either two fies, two directories or two symlinks.
If left entry is a file and right entry is a symlink, they are considered distinct disregarding the content of the file.
Further if both entries are symlinks they need to have the same link value. For example if one symlink points to '/x/b.txt' and the other to '/x/../x/b.txt' the symlinks are considered distinct even if they point to the same file.
Optional skipSkips sub directories. Defaults to 'false'.
Optional skipIgnore empty directories. Defaults to 'false'.
Optional skipIgnore symbolic links. Defaults to 'false'.
Optional ignoreIgnores case when comparing names. Defaults to 'false'.
Optional noToggles presence of diffSet in output. If true, only statistics are provided. Use this when comparing large number of files to avoid out of memory situations. Defaults to 'false'.
Optional includeFile name filter. Comma separated minimatch patterns. See Glob patterns.
Optional excludeFile/directory name exclude filter. Comma separated minimatch patterns. See Glob patterns.
Optional handleHandle permission denied errors. Defaults to 'false'.
By default when some entry cannot be read due to EACCES error the comparison will
stop immediately with an exception.
If handlePermissionDenied is set to true the comparison will continue when unreadable entries are encountered.
Offending entries will be reported within permissionDeniedState, reason and permissionDenied.
Lets consider we want to compare two identical folders A and B with B/dir2 being unreadable for the current user.
A B
├── dir1 ├── dir1
├──── file1 ├──── file1
├── dir2 ├── dir2 (permission denied)
└─────file2 └─────file2
diffSet will look like:
| relativePath | path1 | path2 | state | reason | permissionDeniedState |
|---|---|---|---|---|---|
| [/] | dir1 | dir1 | equal |
||
| [/dir1] | file1 | file1 | equal |
||
| [/] | dir2 | dir2 | distinct |
permission-denied |
access-error-right |
| [/dir2] | file2 | missing | left |
And permissionDenied statistics look like
{
leftPermissionDenied: 0,
rightPermissionDenied: 1,
distinctPermissionDenied: 0,
totalPermissionDenied: 1
}
Optional resultExtension point used for constructing the Result object.
See Result builder.
Optional compareExtension point used to perform sync file content comparison.
See File comparators.
Optional compareExtension point used to perform async file content comparison.
See File comparators.
Optional compareExtension point used to compare files or directories names.
See Name comparators.
Optional filterExtension point used to control which files or directories should be included in the comparison.
See Glob filter.
Generated using TypeDoc
Comparison options.