def get_file(file_path, options = {})
      # Default values
      options[:offset]    = 0     if ! options.has_key?(:offset)
      options[:root_path] = 'app' if ! options.has_key?(:root_path)

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

      # Query params
      query = []
      query << "offset=#{options[:offset]}"
      query << "length=#{options[:length]}" if options.has_key?(:length) # length is optional
      url = "#{url}#{query.join('&')}"

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      headers = {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
      }
      headers["Range"] = options[:range] if options.has_key?(:range)
      req = Net::HTTP::Get.new(uri.path, headers)
      res = http.request(req)
      res_headers = {}
      res.response.each_header {|k,v| res_headers[k] = v}
      res.code == "200" ? {"headers" => res_headers, "body" => res.body} : JSON.parse(res.body)
    end
def get_file(file_path, options = {})
      # Default values
      options[:offset]    = 0     if ! options.has_key?(:offset)
      options[:root_path] = 'app' if ! options.has_key?(:root_path)

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

      # Query params
      query = []
      query << "offset=#{options[:offset]}"
      query << "length=#{options[:length]}" if options.has_key?(:length) # length is optional
      url = "#{url}#{query.join('&')}"

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      headers = {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
      }
      headers["Range"] = options[:range] if options.has_key?(:range)
      req = Net::HTTP::Get.new(uri.path, headers)
      res = http.request(req)
      res_headers = {}
      res.response.each_header {|k,v| res_headers[k] = v}
      res.code == "200" ? {"headers" => res_headers, "body" => res.body} : JSON.parse(res.body)
    end
Read a file.
 The file can be streamed in chunks and also fetched as partial content
  based on the range header specified in the request.
 Only authorised requests can invoke the API.

 Usage: my_client.nfs.get_file("/docs/hello.txt")
 Adv.Usage: my_client.nfs.get_file("/docs/hello.txt", range: "bytes 0-1000", root_path: "app")
 Fail: {"errorCode"=>-1503, "description"=>"FfiError::InvalidPath"}
 Success: {"headers"=>{"x-powered-by"=>"Express", "content-range"=>"bytes 0-4/4", "accept-ranges"=>"bytes", "content-length"=>"4", "created-on"=>"2016-08-14T12:51:18.924Z", "last-modified"=>"2016-08-14T12:51:18.935Z", "content-type"=>"text/plain", "date"=>"Sun, 14 Aug 2016 13:30:07 GMT", "connection"=>"close"}, "body"=>"Test"}

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