34 class TNetFile :
public TFile {
44 TNetFile(
const TNetFile&);
45 TNetFile& operator=(
const TNetFile&);
47 TNetFile(
const char *url,
const char *ftitle, Int_t comp, Bool_t);
48 virtual void ConnectServer(Int_t *stat, EMessageTypes *kind, Int_t netopt,
49 Int_t tcpwindowsize, Bool_t forceOpen,
51 virtual void Create(
const char *url, Option_t *option, Int_t netopt);
52 virtual void Create(TSocket *s, Option_t *option, Int_t netopt);
53 void Init(Bool_t create);
54 void Print(Option_t *option)
const;
55 void PrintError(
const char *where, Int_t err);
56 Int_t Recv(Int_t &status, EMessageTypes &kind);
57 Int_t SysOpen(
const char *pathname, Int_t flags, UInt_t mode);
58 Int_t SysClose(Int_t fd);
59 Int_t SysStat(Int_t fd, Long_t *
id, Long64_t *size, Long_t *flags, Long_t *modtime);
62 TNetFile(
const char *url, Option_t *option =
"",
const char *ftitle =
"",
63 Int_t compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt = 0);
64 TNetFile() : fEndpointUrl(), fUser(), fSocket(0), fProtocol(0), fErrorCode(0), fNetopt(0) { }
67 void Close(Option_t *option=
"");
69 Int_t GetErrorCode()
const {
return fErrorCode; }
70 Bool_t IsOpen()
const;
71 Bool_t Matches(
const char *url);
72 Int_t ReOpen(Option_t *mode);
73 Bool_t ReadBuffer(
char *buf, Int_t len);
74 Bool_t ReadBuffer(
char *buf, Long64_t pos, Int_t len);
75 Bool_t ReadBuffers(
char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
76 Bool_t WriteBuffer(
const char *buf, Int_t len);
77 void Seek(Long64_t offset, ERelativeTo pos = kBeg);
79 const TUrl *GetEndpointUrl()
const {
return &fEndpointUrl; }
85 class TNetSystem :
public TSystem {
96 TNetSystem(
const TNetSystem&);
97 TNetSystem& operator=(
const TNetSystem&);
99 void *GetDirPtr()
const {
return fDirp; }
103 TString fLocalPrefix;
105 void Create(
const char *url, TSocket *sock = 0);
106 void InitRemoteEntity(
const char *url);
109 TNetSystem(Bool_t ftpowner = kTRUE);
110 TNetSystem(
const char *url, Bool_t ftpowner = kTRUE);
111 virtual ~TNetSystem();
113 Bool_t ConsistentWith(
const char *path,
void *dirptr);
114 Int_t MakeDirectory(
const char *name);
115 void *OpenDirectory(
const char *name);
116 void FreeDirectory(
void *dirp = 0);
117 const char *GetDirEntry(
void *dirp = 0);
118 Int_t GetPathInfo(
const char *path, FileStat_t &buf);
119 Bool_t AccessPathName(
const char *path, EAccessMode mode);
120 int Unlink(
const char *path);
122 ClassDef(TNetSystem,0)