Ejemplo n.º 1
0
        public List <string> CreateMultiDirectory(string remotePath)
        {
            List <string> paths = URLHelpers.GetPaths(remotePath);

            foreach (string path in paths)
            {
                if (CreateDirectory(path))
                {
                    DebugHelper.WriteLine("FTP directory created: " + path);
                }
            }

            return(paths);
        }
Ejemplo n.º 2
0
        public List <string> CreateMultiDirectory(string path)
        {
            List <string> directoryList = new List <string>();

            List <string> paths = URLHelpers.GetPaths(path);

            foreach (string directory in paths)
            {
                if (!DirectoryExists(directory))
                {
                    CreateDirectory(directory);
                    directoryList.Add(directory);
                }
            }

            return(directoryList);
        }
Ejemplo n.º 3
0
        private void FillDirectories(string path)
        {
            List <string> paths = URLHelpers.GetPaths(path);

            paths.Insert(0, "/");

            cbDirectoryList.Items.Clear();
            foreach (string directory in paths)
            {
                cbDirectoryList.Items.Add(directory);
            }

            if (cbDirectoryList.Items.Count > 0)
            {
                cbDirectoryList.SelectedIndex = cbDirectoryList.Items.Count - 1;
            }
        }
Ejemplo n.º 4
0
        public List <string> CreateMultiDirectory(string path)
        {
            List <string> directoryList = new List <string>();

            IEnumerable <string> paths = URLHelpers.GetPaths(path).Select(x => x.TrimStart('/'));

            foreach (string directory in paths)
            {
                if (!DirectoryExists(directory))
                {
                    CreateDirectory(directory);
                    DebugHelper.WriteLine("FTP directory created: " + path);
                    directoryList.Add(directory);
                }
            }

            return(directoryList);
        }