What I'm trying to do is find out if any folders are one of the children / parents or are not related.
Is there any function in the Ruby File API ? if you donβt understand how to understand it?
For instance:
real_path_1 = "/Users/amr/Code/xx/zz" real_path_2 = "/Users/amr/Code/"
One more example:
real_path_1 = "/Users/amr/Code/" real_path_2 = "/Users/amr/Code/foo/bar/inside"
Another example:
real_path_1 = "/Users/amr/Code/" real_path_2 = "/Users/amr/Code/"
When nil returns:
real_path_1 = "/Users/other/Code/" # or "/folder2/" real_path_2 = "/Users/amr/Code/" # or "/folder1/" # when I have to compare between these paths like: f_level(real_path_1, real_path_2) # it should return nil # that means real_path_1 is **not at same level** as real_path_2
amrnt source share