34 #ifndef ROOT_MessageTypes
61 TFTP(): fHost(), fUser(), fPort(0), fParallel(0), fWindowSize(0),
62 fProtocol(0), fLastBlock(0), fBlockSize(0), fMode(0),
63 fRestartAt(0), fCurrentFile(), fSocket(0), fBytesWrite(0),
64 fBytesRead(0), fDir(
kFALSE) { }
119 void put(
const char *file,
const char *remoteName = 0) {
PutFile(file, remoteName); }
120 void get(
const char *file,
const char *localName = 0) {
GetFile(file, localName); }
126 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.
void mkdir(const char *dir) const
Int_t GetPathInfo(const char *path, FileStat_t &buf, Bool_t print=kFALSE)
Get info about a file.
Int_t ChangePermission(const char *file, Int_t mode) const
Change permissions of a remote file.
void SetRestartAt(Long64_t at)
Int_t RenameFile(const char *file1, const char *file2) const
Rename a remote file.
Int_t MakeDirectory(const char *dir, Bool_t print=kFALSE) const
Make a remote directory.
void operator=(const TFTP &)
Int_t PrintDirectory() const
Print path of remote working directory.
Bool_t OpenDirectory(const char *name, Bool_t print=kFALSE)
Open a directory via rootd.
void cd(const char *dir) const
Long64_t GetFile(const char *file, const char *localName=0)
Transfer file from remote host.
#define ClassDef(name, id)
void Print(Option_t *opt="") const
Print some info about the FTP connection.
static Long64_t fgBytesWrite
void rm(const char *file) const
Long64_t fBytesWrite
connection to rootd
virtual ~TFTP()
TFTP dtor. Send close message and close socket.
Int_t DeleteFile(const char *file) const
Delete a remote file.
void put(const char *file, const char *remoteName=0)
Int_t ListDirectory(Option_t *cmd="") const
List remote directory.
Int_t GetBlockSize() const
Int_t DeleteDirectory(const char *dir) const
Delete a remote directory.
static Long64_t fgBytesRead
Long64_t GetRestartAt() const
TSocket * GetSocket() const
const char * GetDirEntry(Bool_t print=kFALSE)
Get directory entry via rootd.
void ls(Option_t *cmd="") const
The ls function lists the contents of a class on stdout.
Long64_t PutFile(const char *file, const char *remoteName=0)
Transfer file to remote host.
Int_t ChangeDirectory(const char *dir) const
Change the remote directory.
Int_t Close()
Close ftp connection.
void mv(const char *file1, const char *file2) const
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.
void chmod(const char *file, Int_t mode) const
void Init(const char *url, Int_t parallel, Int_t wsize)
Set up the actual connection.
void rmdir(const char *dir) const
void FreeDirectory(Bool_t print=kFALSE)
Free a remotely open directory via rootd.
Int_t Recv(Int_t &status, EMessageTypes &kind) const
Return status from rootd server and message kind.