64 TNetFile() : fEndpointUrl(), fUser(), fSocket(0), fProtocol(0), fErrorCode(0), fNetopt(0) { }
106 void InitRemoteEntity(
const char *url);
113 Bool_t ConsistentWith(
const char *path,
void *dirptr);
115 void *OpenDirectory(
const char *
name);
116 void FreeDirectory(
void *dirp = 0);
117 const char *GetDirEntry(
void *dirp = 0);
120 int Unlink(
const char *path);
virtual void ConnectServer(Int_t *stat, EMessageTypes *kind, Int_t netopt, Int_t tcpwindowsize, Bool_t forceOpen, Bool_t forceRead)
Connect to remote rootd server.
Int_t SysClose(Int_t fd)
Close currently open file.
This class represents a WWW compatible URL.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Bool_t Matches(const char *url)
Return kTRUE if 'url' matches the coordinates of this file.
TNetFile & operator=(const TNetFile &)
void Flush()
Flush file to disk.
#define ClassDef(name, id)
Int_t ReOpen(Option_t *mode)
Reopen a file with a different access mode, like from READ to UPDATE or from NEW, CREATE...
void PrintError(const char *where, Int_t err)
Print error string depending on error code.
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Return file stat information.
Int_t Recv(Int_t &status, EMessageTypes &kind)
Return status from rootd server and message kind.
void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Set position from where to start reading.
Bool_t WriteBuffer(const char *buf, Int_t len)
Write specified byte range to remote file via rootd daemon.
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read a list of buffers given in pos[] and len[] and return it in a single buffer. ...
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Open a remote file. Requires fOption to be set correctly.
virtual void Create(const char *url, Option_t *option, Int_t netopt)
Create a NetFile object.
void Close(Option_t *option="")
Close remote file.
static constexpr double s
virtual ~TNetFile()
TNetFile dtor. Send close message and close socket.
Bool_t ReadBuffer(char *buf, Int_t len)
Read specified byte range from remote file via rootd daemon.
const TUrl * GetEndpointUrl() const
Bool_t IsOpen() const
Retruns kTRUE if file is open, kFALSE otherwise.
Int_t GetErrorCode() const
void Init(Bool_t create)
Initialize a TNetFile object.
Abstract base class defining a generic interface to the underlying Operating System.
void Print(Option_t *option) const
Print some info about the net file.