Ejemplo n.º 1
0
        private void DeleteDirectory(string path)
        {
            //Get files
            var files = FtpManager.GetList(path, "frbadmin", p);

            //Loop through files
            foreach (var fileStruct in files)
            {
                //If directory, need to delete sub directories
                if (fileStruct.IsDirectory)
                {
                    DeleteDirectory(path + "/" + fileStruct.Name);
                }
                else
                {
                    FtpManager.DeleteRemoteFile(path + "/" + fileStruct.Name, "frbadmin", p);
                }
            }

            DeleteFtpDirectory(path, "frbadmin", p);
        }