@@ -36,7 +36,7 @@ the files, so it is not able to report which values are different.
3636
3737### Compare two directories
3838
39- If one wants to compare two directories with the following structures:
39+ Let's compare two directories with the following structures:
4040
4141``` bash
4242└── reference_dir
@@ -55,6 +55,9 @@ If one wants to compare two directories with the following structures:
5555 └── file_1.c
5656```
5757
58+ The ` reference ` directory contains all the files that should be checked in the ` compared ` directory,
59+ which means that extraneous files in the ` compared ` directory are just ignored.
60+
5861These two directories can be compared with the following code:
5962
6063``` python
@@ -63,7 +66,15 @@ import dir_content_diff
6366dir_content_diff.compare_trees(" reference_dir" , " compared_dir" )
6467```
6568
66- This code will return an empty dictionary because no difference was detected.
69+ > [ !WARNING]
70+ > The order of the parameters is important: the first path is considered as the ` reference `
71+ > directory while the second one is the ` compared ` directory. Inverting the parameters may return
72+ > a different result (in this example it would return that the file ` sub_file_3.b ` is missing).
73+
74+ If all the files are identical, this code will return an empty dictionary because no difference
75+ was detected. As mentioned previously, this is because ` dir-content-diff ` is only looking for files
76+ in the compared directory that are also present in the reference directory, so the file
77+ ` sub_file_3.b ` is just ignored in this case.
6778
6879If `` reference_dir/file_1.c `` is the following JSON-like file:
6980
0 commit comments