Exemplo n.º 1
0
        private static void ProcessDownload(Properties props)
        {
            GlacierizerDownloader downloader = new GlacierizerDownloader(props);

            if (downloader.Download())
            {
                Console.WriteLine("Downloaded: " + Utilities.BytesToHuman(downloader.TotalBytesDownloaded));
                Console.WriteLine("Success!");
            }
        }
Exemplo n.º 2
0
        private static void ProcessInteractiveCommands(Properties props)
        {
            Console.Write("What would you like to do (upload, download, list, resume)? ");
            string operation = Console.ReadLine();

            Console.Write("Please enter Vault name: ");
            props.vault = Console.ReadLine();

            switch (operation)
            {
            case "upload":
            case "download":
            {
                Console.Write("Enter an existing retrieval job ID (leave empty if new request): ");
                props.jobId = Console.ReadLine();

                Console.Write("Enter the archive ID: ");
                props.archive = Console.ReadLine();

                GlacierizerDownloader downloader = new GlacierizerDownloader(props);

                if (downloader.Download())
                {
                    Console.WriteLine("Downloaded: " + Utilities.BytesToHuman(downloader.TotalBytesDownloaded));
                    Console.WriteLine("Success!");
                }

                break;
            }

            case "resume":
            {
                break;
            }

            case "list":
            default:
                break;
            }
        }
Exemplo n.º 3
0
        private static void ProcessInteractiveCommands(Properties props)
        {
            Console.Write("What would you like to do (upload, download, list, resume)? ");
            string operation = Console.ReadLine();

            Console.Write("Please enter Vault name: ");
            props.vault = Console.ReadLine();

            switch (operation)
            {
                case "upload":
                case "download":
                    {
                        Console.Write("Enter an existing retrieval job ID (leave empty if new request): ");
                        props.jobId = Console.ReadLine();

                        Console.Write("Enter the archive ID: ");
                        props.archive = Console.ReadLine();

                        GlacierizerDownloader downloader = new GlacierizerDownloader(props);

                        if (downloader.Download())
                        {
                            Console.WriteLine("Downloaded: " + Utilities.BytesToHuman(downloader.TotalBytesDownloaded));
                            Console.WriteLine("Success!");
                        }

                        break;
                    }
                case "resume":
                    {

                        break;
                    }
                case "list":
                default:
                    break;
            }
        }
Exemplo n.º 4
0
        private static void ProcessDownload(Properties props)
        {
            GlacierizerDownloader downloader = new GlacierizerDownloader(props);

            if (downloader.Download())
            {
                Console.WriteLine("Downloaded: " + Utilities.BytesToHuman(downloader.TotalBytesDownloaded));
                Console.WriteLine("Success!");
            }
        }