MCPcopy
hub / github.com/restic/restic / Equals

Method Equals

internal/data/node.go:214–290  ·  view source on GitHub ↗
(other Node)

Source from the content-addressed store, hash-verified

212}
213
214func (node Node) Equals(other Node) bool {
215 if node.Name != other.Name {
216 return false
217 }
218 if node.Type != other.Type {
219 return false
220 }
221 if node.Mode != other.Mode {
222 return false
223 }
224 if !node.ModTime.Equal(other.ModTime) {
225 return false
226 }
227 if !node.AccessTime.Equal(other.AccessTime) {
228 return false
229 }
230 if !node.ChangeTime.Equal(other.ChangeTime) {
231 return false
232 }
233 if node.UID != other.UID {
234 return false
235 }
236 if node.GID != other.GID {
237 return false
238 }
239 if node.User != other.User {
240 return false
241 }
242 if node.Group != other.Group {
243 return false
244 }
245 if node.Inode != other.Inode {
246 return false
247 }
248 if node.DeviceID != other.DeviceID {
249 return false
250 }
251 if node.Size != other.Size {
252 return false
253 }
254 if node.Links != other.Links {
255 return false
256 }
257 if node.LinkTarget != other.LinkTarget {
258 return false
259 }
260 if node.Device != other.Device {
261 return false
262 }
263 if !node.sameContent(other) {
264 return false
265 }
266 if !node.sameExtendedAttributes(other) {
267 return false
268 }
269 if !node.sameGenericAttributes(other) {
270 return false
271 }

Callers 15

setAndVerifyXattrFunction · 0.95
TestEncryptDecryptFunction · 0.45
TestLargeEncryptFunction · 0.45
TestHandleStringFunction · 0.45
TestReadFunction · 0.45
TestRoundtripFunction · 0.45
TestCanceledRoundtripFunction · 0.45
TestUploadTimeoutFunction · 0.45
TestProcessingTimeoutFunction · 0.45
TestDownloadTimeoutFunction · 0.45
loadFunction · 0.45
TestFilesFunction · 0.45

Calls 4

sameContentMethod · 0.95
sameGenericAttributesMethod · 0.95
EqualMethod · 0.80

Tested by 15

setAndVerifyXattrFunction · 0.76
TestEncryptDecryptFunction · 0.36
TestLargeEncryptFunction · 0.36
TestHandleStringFunction · 0.36
TestReadFunction · 0.36
TestRoundtripFunction · 0.36
TestCanceledRoundtripFunction · 0.36
TestUploadTimeoutFunction · 0.36
TestProcessingTimeoutFunction · 0.36
TestDownloadTimeoutFunction · 0.36
loadFunction · 0.36
TestFilesFunction · 0.36