Virtualfolder

Class: Virtualfolder

Version 1.6 - Updated on 03/23/2017

Contents

Constructor Details

#initialize(session) ⇒ Virtualfolder

————————————————- Virtual folder functions —————————————–

def initialize(session)
  # Instance variables
  @session = session
end

Instance Method Details

createVirtualFolder

#createVirtualFolder(name) ⇒ Object

Creates a virtual folder.

  • Arguments:

    • name: Name of virtual folder.
  • Returns:

    • A Hash object.
def createVirtualFolder(name)
  headers = {'Content-Type' => 'application/json'}
  params = URI.encode(name).gsub('+','%20')
  response = @session.do_post_without_params 'virtualfolder/'+params, headers
  Sdk::parse_response(response,raw=true)
end

deleteVirtualFolder

#deleteVirtualFolder(name, force = 'false') ⇒ Object

Deletes a vitual folder.

  • Arguments:

    • name: name of virtual folder
    • force: If set to:
      • false(default) - the virtual folder is not deleted if it contains any files or folders or references to deleted files or folders.
      • true - the virtual folder is deleted only if it contains references to deleted files or folders.
  • Returns:

    • A Hash object.
def deleteVirtualFolder(name,force = 'false')
  params = {
    "name" => name,
    "force" => force
  }
  logger = Logger.new(STDOUT)
 logger.info params
  response = @session.do_delete_with_params "virtualfolder", params
  Sdk::parse_response(response, raw=true)
end

renameVirtualFolder

#renameVirtualFolder(virtualfolderdata) ⇒ Object

Updates a virtual folder.

  • Arguments:

    • virtualfolderdata: virtual folder data in the json format.
  • Returns:

    • A Hash object.
def renameVirtualFolder(virtualfolderdata)
  params = virtualfolderdata

  headers = {'Content-Type' => 'application/json'}
  response = @session.do_put "virtualfolder", params, headers
  Sdk::parse_response(response)
end

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.