code: function setFolds(path, folds) {
          var context = getViewStateContext();
          var allFolds = PreferencesManager.getViewState(FOLDS_PREF_KEY, context);
          allFolds[path] = simplify(folds);
          PreferencesManager.setViewState(FOLDS_PREF_KEY, allFolds, context);
      }
docs: Saves the line folds for the specified path
  @param {!string} path the path to the document
  @param {Object} folds the fold ranges to save for the current document