lib/DropboxSDK/ARKS.rb
# pass in the folder name in dropbox side inside of your app from where files are to be downloaded
pass in the folder name in dropbox side inside of your app from where files are to be downloaded
pass in the folder name in dropbox side inside of your app from where files are to be downloaded
def download_files(file_lists, dump_folder_path, folder_name)
        FileUtils.mkdir_p(dump_folder_path + folder_name)
        if file_lists.any?
          puts "Downloading files ...."
          file_lists.each do |f|
            body = @dbx.download(f.path_display)
            open(dump_folder_path+f.path_display, 'wb') { |f| f.write body.to_s }
          end
          puts "Donwload completed."
        else
          puts "Empty folder. Please add some files to your folder in dropbox and try again."
        end
      end
def download_files ( file_lists , dump_folder_path , folder_name ) FileUtils . mkdir_p ( dump_folder_path + folder_name ) if file_lists . any? puts "Downloading files ...." file_lists . each do | f | body = @dbx . download ( f . path_display ) open ( dump_folder_path + f . path_display , 'wb' ) { | f | f . write body . to_s } end puts "Donwload completed." else puts "Empty folder. Please add some files to your folder in dropbox and try again." end end
pass in the folder name in dropbox side inside of your app from where files are to be downloaded
pass in the folder name in dropbox side inside of your app from where files are to be downloaded
# get all the files path to download appropriate files
file_lists
<not_specific>
dump_folder_path
<not_specific>
folder_name
<not_specific>