Example #1
0
        public RemoteFolders GetRootGroup()
        {
            RemoteFolders root = this;

            while (root.Parent != null)
            {
                root = root.Parent;
            }
            return(root);
        }
Example #2
0
 public List <RemoteFolders> GetFolders(RemoteFolders folder, List <RemoteFolders> remoteFolders)
 {
     if (folder != null)
     {
         FTPFile[] files = GetSubFolders(folder.Name);
         foreach (FTPFile ftpFile in files)
         {
             if (ftpFile != null && ftpFile.Dir)
             {
                 RemoteFolders remoteFolder = new RemoteFolders(ftpFile.Name, folder);
                 remoteFolders.Add(remoteFolder);
                 GetFolders(remoteFolder, remoteFolders);
             }
         }
     }
     return(remoteFolders);
 }
Example #3
0
 public RemoteFolders(string name, RemoteFolders parent)
 {
     Name     = name;
     Parent   = parent;
     Children = new List <RemoteFolders>();
 }