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

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

      # Payload
      payload = {
        isPrivate: options[:is_private],
      }

      # Optional
      payload["metadata"] = Base64.strict_encode64(options[:meta]) if options.has_key?(:meta)

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      req = Net::HTTP::Post.new(uri.path, {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
        'Content-Type' => 'application/json'
      })
      req.body = payload.to_json
      res = http.request(req)
      res.code == "200" ? true : JSON.parse(res.body)
    end
def create_directory(dir_path, options = {})
      # Default values
      options[:root_path]      = 'app' if ! options.has_key?(:root_path)
      options[:is_private]     = true  if ! options.has_key?(:is_private)

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

      # Payload
      payload = {
        isPrivate: options[:is_private],
      }

      # Optional
      payload["metadata"] = Base64.strict_encode64(options[:meta]) if options.has_key?(:meta)

      # API call
      uri = URI(url)
      http = Net::HTTP.new(uri.host, uri.port)
      req = Net::HTTP::Post.new(uri.path, {
        'Authorization' => "Bearer #{@client.key_helper.get_valid_token()}",
        'Content-Type' => 'application/json'
      })
      req.body = payload.to_json
      res = http.request(req)
      res.code == "200" ? true : JSON.parse(res.body)
    end
Create a public or private directory either in the application's root
  directory or in SAFE Drive.
 Only authorised requests can create a directory.

 Usage: my_client.nfs.create_directory("/photos")
 Adv.Usage: my_client.nfs.create_directory("/photos", meta: "some meta", root_path: 'drive', is_private: true)
 Fail: {"errorCode"=>-505, "description"=>"NfsError::FileAlreadyExistsWithSameName"}
 Success: true

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