src/drive_manager.rb
def traverse_and_create path
    root = @folder_cache.values.find{|file| file.name == ROOT_FOLDER and file.parents.nil?}

    #DriveV3::File (actually folders)
    files = [root]
    places = path.split '/'
    places.each do |place|
      next if place == ''
      folder = folder_with_name place, files.last
      folder = create_folder(place, files.last) if folder.nil?
      files << folder
    end
    files.last
  end
#Traverses the given path on drive, creates any missing folders and returns the last folder in the path
Traverses the given path on drive, creates any missing folders and returns the last folder in the path
Traverses the given path on drive creates any missing folders and returns the last folder in the path
def traverse_and_create path
    root = @folder_cache.values.find{|file| file.name == ROOT_FOLDER and file.parents.nil?}
    files = [root]
    places = path.split '/'
    places.each do |place|
      next if place == ''
      folder = folder_with_name place, files.last
      folder = create_folder(place, files.last) if folder.nil?
      files << folder
    end
    files.last
  end
def traverse_and_create path root = @folder_cache . values . find { | file | file . name == ROOT_FOLDER and file . parents . nil? } files = [ root ] places = path . split '/' places . each do | place | next if place == '' folder = folder_with_name place , files . last folder = create_folder ( place , files . last ) if folder . nil? files << folder end files . last end
Traverses the given path on drive, creates any missing folders and returns the last folder in the path
Traverses the given path on drive creates any missing folders and returns the last folder in the path
#DriveV3::File (actually folders)
path