예제 #1
0
        public static void downloadFile(DropboxApi api, DropboxClient client)
        {
            string name = "";
            string path = "";

            Console.WriteLine("Введите название загружаемого файла");
            name = Console.ReadLine();



            Console.WriteLine("Name= " + name);



            var folder = client.downloadFile(api, name);

            string[] spl = name.Split('\\');

            foreach (string s in spl)
            {
                if (s.Trim() != "")
                {
                    path = s;
                }
            }
            Console.WriteLine("Name= " + path);

            folder.Save(path);

            Console.WriteLine("\t\tФайл добавлен");
            Console.WriteLine("{0,20}{1,30}", "Путь ", folder.Root + folder.Path);
            Console.WriteLine("{0,20}{1,30}", "Изменено ", folder.Modified);
        }