public void MergeWith(FSNodeDir node)
        {
            for (int i = 0; i < node.FilesList.Count; i++)
            {
                FSNodeFile fsnf = node.FilesList.Values[i];
                if (!ContainsFile(fsnf.Name))
                {
                    if (!HasLocalFile(fsnf.Name))
                    {
                        continue;
                    }
                    if (fsnf is FSNodeVirtualFile)
                    {
                        new FSNodeFile(fsnf.Name, m_tree, this);
                        if (m_tree != null)
                        {
                            m_tree.InvokeNodeFileIsVirtualChanged((FSNodeVirtualFile)node.m_files[fsnf.Name]);
                        }
                        node.LocalCountAdd(-1);
                    }
                    else
                    {
                        fsnf.Parent = this;
                        node.LocalCountAdd(-1);
                        i--;
                    }
                }
                else if (m_files[fsnf.Name] is FSNodeVirtualFile && m_files[fsnf.Name].HasLocal)
                {
                    if (m_tree != null)
                    {
                        m_tree.InvokeNodeFileIsVirtualChanged((FSNodeVirtualFile)m_files[fsnf.Name]);
                    }
                    LocalCountAdd(1);
                }
            }

            for (int i = 0; i < node.SubDirsList.Count; i++)
            {
                FSNodeDir fsnd = node.SubDirsList.Values[i];
                if (!ContainsDirectory(fsnd.Name))
                {
                    fsnd.Parent = this;
                    i--;
                }
                else
                {
                    m_subdirs[fsnd.m_name].MergeWith(fsnd);
                }
            }
        }
        public void MergeWith(FSNodeDir node)
        {
            for (int i = 0; i < node.FilesList.Count; i++)
            {
                FSNodeFile fsnf = node.FilesList.Values[i];
                if (!ContainsFile(fsnf.Name))
                {
                    if (!HasLocalFile(fsnf.Name))
                        continue;
                    if (fsnf is FSNodeVirtualFile)
                    {
                        new FSNodeFile(fsnf.Name, m_tree, this);
                        if (m_tree != null)
                            m_tree.InvokeNodeFileIsVirtualChanged((FSNodeVirtualFile) node.m_files[fsnf.Name]);
                        node.LocalCountAdd(-1);
                    }
                    else
                    {
                        fsnf.Parent = this;
                        node.LocalCountAdd(-1);
                        i--;
                    }
                }
                else if (m_files[fsnf.Name] is FSNodeVirtualFile && m_files[fsnf.Name].HasLocal)
                {
                    if (m_tree != null)
                        m_tree.InvokeNodeFileIsVirtualChanged((FSNodeVirtualFile) m_files[fsnf.Name]);
                    LocalCountAdd(1);
                }
            }

            for (int i = 0; i < node.SubDirsList.Count; i++)
            {
                FSNodeDir fsnd = node.SubDirsList.Values[i];
                if (!ContainsDirectory(fsnd.Name))
                {
                    fsnd.Parent = this;
                    i--;
                }
                else
                    m_subdirs[fsnd.m_name].MergeWith(fsnd);
            }
        }