120 int Unlink(
const char *path);
#define ClassDef(name, id)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Open a remote file. Requires fOption to be set correctly.
Int_t GetErrorCode() const
void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Set position from where to start reading.
void Print(Option_t *option) const
Print some info about the net file.
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Return file stat information.
virtual void Create(const char *url, Option_t *option, Int_t netopt)
Create a NetFile object.
TNetFile(const TNetFile &)
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 Recv(Int_t &status, EMessageTypes &kind)
Return status from rootd server and message kind.
Bool_t IsOpen() const
Retruns kTRUE if file is open, kFALSE otherwise.
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.
Bool_t Matches(const char *url)
Return kTRUE if 'url' matches the coordinates of this file.
Int_t SysClose(Int_t fd)
Close currently open file.
void PrintError(const char *where, Int_t err)
Print error string depending on error code.
const TUrl * GetEndpointUrl() const
Bool_t ReadBuffer(char *buf, Int_t len)
Read specified byte range from remote file via rootd daemon.
void Init(Bool_t create)
Initialize a TNetFile object.
Bool_t WriteBuffer(const char *buf, Int_t len)
Write specified byte range to remote file via rootd daemon.
void Close(Option_t *option="")
Close remote file.
virtual ~TNetFile()
TNetFile dtor. Send close message and close socket.
void Flush()
Flush file to disk.
TNetFile & operator=(const TNetFile &)
Int_t ReOpen(Option_t *mode)
Reopen a file with a different access mode, like from READ to UPDATE or from NEW, CREATE,...
const char * GetDirEntry(void *dirp=0)
Get directory entry via rootd. Returns 0 in case no more entries.
void InitRemoteEntity(const char *url)
Parse and save coordinates of the remote entity (user, host, port, ...)
Int_t MakeDirectory(const char *name)
Make a directory via rootd.
void Create(const char *url, TSocket *sock=0)
Create a TNetSystem object.
void FreeDirectory(void *dirp=0)
Free directory via rootd.
Bool_t ConsistentWith(const char *path, void *dirptr)
Check consistency of this helper with the one required by 'path' or 'dirptr'.
Bool_t AccessPathName(const char *path, EAccessMode mode)
Returns FALSE if one can access a file using the specified access mode.
TNetSystem & operator=(const TNetSystem &)
Int_t GetPathInfo(const char *path, FileStat_t &buf)
Get info about a file.
virtual ~TNetSystem()
Destructor.
TNetSystem(const TNetSystem &)
int Unlink(const char *path)
Remove a path.
void * OpenDirectory(const char *name)
Open a directory and return an opaque pointer to a dir structure.
Abstract base class defining a generic interface to the underlying Operating System.
This class represents a WWW compatible URL.
static constexpr double s
@ kUseCompiledDefault
Use the compile-time default setting.