You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* These comparators are included with dir-compare.
104
+
* List of {@link CompareFileHandler}s included with dir-compare.
106
105
*
107
-
* The `defaultFileCompare` is used when {@link Options.compareContent} is enabled
108
-
* and {@link Options.compareFileSync} or {@link Options.compareFileAsync} are sent as `undefined`.
109
-
*
110
-
* See [Custom file content comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators) for details.
106
+
* See [File content comparators](https://github.com/gliviu/dir-compare#file-content-comparators) for details.
* List of {@link CompareNameHandler}s included with dir-compare.
115
+
*
116
+
* See [Name comparators](https://github.com/gliviu/dir-compare#name-comparators) for details.
Copy file name to clipboardExpand all lines: src/types.ts
+56-72Lines changed: 56 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ export interface Options {
83
83
includeFilter?: string
84
84
85
85
/**
86
-
* File/directory name exclude filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns)
86
+
* File/directory name exclude filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns).
87
87
*/
88
88
excludeFilter?: string
89
89
@@ -128,31 +128,37 @@ export interface Options {
128
128
handlePermissionDenied?: boolean
129
129
130
130
/**
131
-
* Callback for constructing result. Called for each compared entry pair.
131
+
* Extension point used for constructing the {@link Result} object.
132
132
*
133
-
* Updates 'statistics' and 'diffSet'.
134
-
*
135
-
* See [Custom result builder](https://github.com/gliviu/dir-compare#custom-result-builder).
133
+
* See [Result builder](https://github.com/gliviu/dir-compare#result-builder).
136
134
*/
137
135
resultBuilder?: ResultBuilder
138
136
139
137
/**
140
-
* File content comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators).
138
+
* Extension point used to perform sync file content comparison.
139
+
*
140
+
* See [File comparators](https://github.com/gliviu/dir-compare#file-content-comparators).
141
141
*/
142
142
compareFileSync?: CompareFileSync
143
143
144
144
/**
145
-
* File content comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators).
145
+
* Extension point used to perform async file content comparison.
146
+
*
147
+
* See [File comparators](https://github.com/gliviu/dir-compare#file-content-comparators).
146
148
*/
147
149
compareFileAsync?: CompareFileAsync
148
150
149
151
/**
150
-
* Entry name comparison handler. See [Custom name comparators](https://github.com/gliviu/dir-compare#custom-name-comparators).
152
+
* Extension point used to compare files or directories names.
153
+
*
154
+
* See [Name comparators](https://github.com/gliviu/dir-compare#name-comparators).
151
155
*/
152
156
compareNameHandler?: CompareNameHandler
153
157
154
158
/**
155
-
* Filter handler. todo: See [Custom name comparators](https://github.com/gliviu/dir-compare#custom-name-comparators).
159
+
* Extension point used to control which files or directories should be included in the comparison.
160
+
*
161
+
* See [Glob filter](https://github.com/gliviu/dir-compare#glob-filter).
156
162
*/
157
163
filterHandler?: FilterHandler
158
164
}
@@ -167,36 +173,6 @@ export type DiffSet = Array<Difference>
167
173
*/
168
174
exporttypeOptionalDiffSet=DiffSet|undefined
169
175
170
-
/**
171
-
* Callback for constructing comparison result. Called for each compared entry pair.
172
-
*
173
-
* Updates 'statistics' and 'diffSet'.
174
-
*/
175
-
exporttypeResultBuilder=
176
-
/**
177
-
* @param entry1 Left entry.
178
-
* @param entry2 Right entry.
179
-
* @param state See [[DifferenceState]].
180
-
* @param level Depth level relative to root dir.
181
-
* @param relativePath Path relative to root dir.
182
-
* @param statistics Statistics to be updated.
183
-
* @param diffSet Status per each entry to be appended.
184
-
* Do not append if [[Options.noDiffSet]] is false.
185
-
* @param reason See [[Reason]]. Not available if entries are equal.
186
-
*/
187
-
(
188
-
entry1: Entry|undefined,
189
-
entry2: Entry|undefined,
190
-
state: DifferenceState,
191
-
level: number,
192
-
relativePath: string,
193
-
options: Options,
194
-
statistics: InitialStatistics,
195
-
diffSet: DiffSet|undefined,
196
-
reason: Reason|undefined,
197
-
permissionDeniedState: PermissionDeniedState
198
-
)=>void
199
-
200
176
exporttypeEntryOrigin='left'|'right'
201
177
202
178
exportinterfaceEntry{
@@ -495,7 +471,7 @@ export interface Difference {
495
471
path2?: string
496
472
497
473
/**
498
-
* Path relative to root dir.
474
+
* Path relative to the root directory of the comparison.
0 commit comments