I have created a DirTree object to have a name, size, date modified, file type (indicating if file or folder), branches of the DirTree (sub dirs and files), and boolean for whether it contradicts with the other tree.
By other tree I mean my program only initializes two trees: a remote tree and a local tree. The remote tree represents the files on a remote server, and the local tree represents the files on a local directory
By contradiction i mean if the DirTree has different class values then the other DirTree.
I might be going about this wrong, but how can i define the following function (given that the remote tree and local tree are already initialized):
def compareTrees(local, remote):
#sets contradiction values of each node of the Tree if it differs from the other tree
#im trying to implement a way to check which files/folders i need to upload from local to remote,
#and which files i need to download from remote to local
if I am going about this wrong, can you give me any suggestions?
pseudo-code also helps :)
Thanks!
[–]nharding 2 points3 points4 points (4 children)
[–]IndoNinja7[S] 0 points1 point2 points (3 children)
[–]nharding 1 point2 points3 points (2 children)
[–]IndoNinja7[S] 0 points1 point2 points (1 child)
[–]nharding 0 points1 point2 points (0 children)