class Syncthing::Helper::CLI::FolderCreateCommand

Public Instance Methods

execute() click to toggle source
# File lib/syncthing/helper/cli/folder_command.rb, line 7
def execute
  super
  folders.each do |f|
    folder_id, folder_path, folder_label = f.split ':'

    folder = {"id" => folder_id,
              "path" => folder_path,
              "label" => folder_label,
              "type" =>"readwrite",
              "devices" => [],
              "maxConflicts" => -1}
    API::Firestore.doc('folders/' + folder_id).set(folder)
  end
end