53 TFTP(): fHost(), fUser(), fPort(0), fParallel(0), fWindowSize(0),
54 fProtocol(0), fLastBlock(0), fBlockSize(0), fMode(0),
55 fRestartAt(0), fCurrentFile(), fSocket(0), fBytesWrite(0),
56 fBytesRead(0), fDir(
kFALSE) { }
111 void put(
const char *file,
const char *remoteName = 0) {
PutFile(file, remoteName); }
112 void get(
const char *file,
const char *localName = 0) {
GetFile(file, localName); }
118 void mv(
const char *file1,
const char *file2)
const {
RenameFile(file1, file2); }
void PrintError(const char *where, Int_t err) const
Print error string depending on error code.
Int_t GetPathInfo(const char *path, FileStat_t &buf, Bool_t print=kFALSE)
Get info about a file.
void SetRestartAt(Long64_t at)
void mv(const char *file1, const char *file2) const
void operator=(const TFTP &)
void rmdir(const char *dir) const
void rm(const char *file) const
Int_t DeleteFile(const char *file) const
Delete a remote file.
Bool_t OpenDirectory(const char *name, Bool_t print=kFALSE)
Open a directory via rootd.
Long64_t GetRestartAt() const
Long64_t GetFile(const char *file, const char *localName=0)
Transfer file from remote host.
#define ClassDef(name, id)
Int_t ChangeDirectory(const char *dir) const
Change the remote directory.
Int_t GetBlockSize() const
static Long64_t fgBytesWrite
void cd(const char *dir) const
void mkdir(const char *dir) const
Long64_t fBytesWrite
connection to rootd
virtual ~TFTP()
TFTP dtor. Send close message and close socket.
void put(const char *file, const char *remoteName=0)
Int_t ListDirectory(Option_t *cmd="") const
List remote directory.
Int_t ChangePermission(const char *file, Int_t mode) const
Change permissions of a remote file.
static Long64_t fgBytesRead
Int_t Recv(Int_t &status, EMessageTypes &kind) const
Return status from rootd server and message kind.
void ls(Option_t *cmd="") const
The ls function lists the contents of a class on stdout.
const char * GetDirEntry(Bool_t print=kFALSE)
Get directory entry via rootd.
Int_t RenameFile(const char *file1, const char *file2) const
Rename a remote file.
Long64_t PutFile(const char *file, const char *remoteName=0)
Transfer file to remote host.
Int_t MakeDirectory(const char *dir, Bool_t print=kFALSE) const
Make a remote directory.
void Print(Option_t *opt="") const
Print some info about the FTP connection.
void chmod(const char *file, Int_t mode) const
Int_t Close()
Close ftp connection.
void SetBlockSize(Int_t blockSize)
Make sure the block size is a power of two, with a minimum of 32768.
Mother of all ROOT objects.
Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists, Bool_t print=kFALSE)
Returns kFALSE if one can access a file using the specified access mode.
Int_t PrintDirectory() const
Print path of remote working directory.
void Init(const char *url, Int_t parallel, Int_t wsize)
Set up the actual connection.
void FreeDirectory(Bool_t print=kFALSE)
Free a remotely open directory via rootd.
Int_t DeleteDirectory(const char *dir) const
Delete a remote directory.
TSocket * GetSocket() const