def get_directory(dir_path, options = {})
      # Default values
      options[:root_path] = 'app' if ! options.has_key?(:root_path)

      # Entry point
      url = "#{@client.app_info[:launcher_server]}#{API_VERSION}/nfs/directory/#{options[:root_path]}/#{SafeNet.escape(dir_path)}"

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      req = Net::HTTP::Get.new(uri.path, {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
      })
      res = http.request(req)
      JSON.parse(res.body)
    end
def get_directory(dir_path, options = {})
      # Default values
      options[:root_path] = 'app' if ! options.has_key?(:root_path)

      # Entry point
      url = "#{@client.app_info[:launcher_server]}#{API_VERSION}/nfs/directory/#{options[:root_path]}/#{SafeNet.escape(dir_path)}"

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      req = Net::HTTP::Get.new(uri.path, {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
      })
      res = http.request(req)
      JSON.parse(res.body)
    end
Fetch a directory.
 Only authorised requests can invoke this API.

 Usage: my_client.nfs.get_directory("/photos", root_path: 'drive')
 Fail: {"errorCode"=>-1502, "description"=>"FfiError::PathNotFound"}
 Success: {"info"=> {"name"=> "my_dir", ...}, ...}

 Reference: https://maidsafe.readme.io/docs/nfs-get-directory