I want to move an old folder with all its contents to another new folder, however, I've to check that the new folder destination is not including the old folder destination otherwise I am trying to move the folder into itself which is impossible.
I want to check whether an old path already is a subset of a new path.
Something like:
check_function( "folder/test" , "folder/test/test2"); //true
check_function( "folder/test/" , "folder/test/test2"); //true
check_function( "folder/test" , "folder/test2"); //false
check_function( "folder/test" , "folder/test2/test3"); //false
How can I do this?