Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TCurlFile.h
Go to the documentation of this file.
1// @(#)root/net:$Id$
2// Author: Jakob Blomer
3
4/*************************************************************************
5 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TCurlFile
13#define ROOT_TCurlFile
14
16#include "TFile.h"
17
18#include <memory>
19
20class TCurlFile : public TFile {
21 std::unique_ptr<ROOT::Internal::RCurlConnection> fConnection;
22
23public:
24 TCurlFile(const char *url, Option_t *option = "");
25
26 Long64_t GetSize() const override;
27 void Seek(Long64_t offset, ERelativeTo pos = kBeg) override;
28 Bool_t ReadBuffer(char *buf, Int_t len) override;
29 Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len) override;
30 Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override;
31
33};
34
35#endif
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
TCurlFile(const char *url, Option_t *option="")
Definition TCurlFile.cxx:19
std::unique_ptr< ROOT::Internal::RCurlConnection > fConnection
Definition TCurlFile.h:21
Bool_t ReadBuffer(char *buf, Int_t len) override
Read a buffer from the file.
Definition TCurlFile.cxx:52
Long64_t GetSize() const override
Returns the current file size.
Definition TCurlFile.cxx:29
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override
Read the nbuf blocks described in arrays pos and len.
void Seek(Long64_t offset, ERelativeTo pos=kBeg) override
Seek to a specific position in the file. Pos it either kBeg, kCur or kEnd.
Definition TCurlFile.cxx:38
TFile(const TFile &)=delete
ERelativeTo
Definition TFile.h:277
@ kBeg
Definition TFile.h:277