同步目录树算法帮助

问题描述 投票:1回答:1

有人可以看看我的算法,看看他们是否可以用连续的点填充区域???我正在制作一个Python程序,该程序查看远程目录树和本地目录树并将两者同步,但是我遇到了一个绊脚石:

(I have set folder checksums to be lists containing checksums of its children,
only files have md5 checksum strings instead of lists)

START

Go through whole local tree and compare each node to all remote nodes 
according to these rules:

    if the local file and a remote file have same md5 sum
    and one of those files is closer to todays date,
        if the one file is local,
            then delete remote file and upload local file.
        else
            then delete local file and download remote file.

    if the local folder and a remote folder have same checksum
    and one of those folders is closer to todays date,
        if the one folder is local,
            then ....
        else
            then ....

    else the local file/folder does not match any remote file/folder checksum,
        then ....

Go through whole remote tree and compare each node to all local nodes 
according to these rules:

    if the remote file/folder does not match any local file/folder checksum,
        then ....

DONE
python algorithm directory-structure
1个回答
-1
投票

我了解了GitHub提交树如何工作,并使用它们来解决我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.