#include <TFTP.h>
Inheritance diagram for TFTP:
Public Types | |
enum | |
enum | |
Public Member Functions | |
TFTP (const char *url, Int_t parallel=1, Int_t wsize=kDfltWindowSize, TSocket *sock=0) | |
virtual | ~TFTP () |
void | SetBlockSize (Int_t blockSize) |
Int_t | GetBlockSize () const |
void | SetRestartAt (Long64_t at) |
Long64_t | GetRestartAt () const |
Int_t | GetMode () const |
Bool_t | IsOpen () const |
void | Print (Option_t *opt="") const |
Long64_t | PutFile (const char *file, const char *remoteName=0) |
Long64_t | GetFile (const char *file, const char *localName=0) |
Bool_t | AccessPathName (const char *path, EAccessMode mode=kFileExists, Bool_t print=kFALSE) |
const char * | GetDirEntry (Bool_t print=kFALSE) |
Int_t | GetPathInfo (const char *path, FileStat_t &buf, Bool_t print=kFALSE) |
Int_t | ChangeDirectory (const char *dir) const |
Int_t | MakeDirectory (const char *dir, Bool_t print=kFALSE) const |
Int_t | DeleteDirectory (const char *dir) const |
Int_t | ListDirectory (Option_t *cmd="") const |
void | FreeDirectory (Bool_t print=kFALSE) |
Bool_t | OpenDirectory (const char *name, Bool_t print=kFALSE) |
Int_t | PrintDirectory () const |
Int_t | RenameFile (const char *file1, const char *file2) const |
Int_t | DeleteFile (const char *file) const |
Int_t | ChangePermission (const char *file, Int_t mode) const |
Int_t | Close () |
void | Binary () |
void | Ascii () |
TSocket * | GetSocket () const |
void | put (const char *file, const char *remoteName=0) |
void | get (const char *file, const char *localName=0) |
void | cd (const char *dir) const |
void | mkdir (const char *dir) const |
void | rmdir (const char *dir) const |
void | ls (Option_t *cmd="") const |
void | pwd () const |
void | mv (const char *file1, const char *file2) const |
void | rm (const char *file) const |
void | chmod (const char *file, Int_t mode) const |
void | bye () |
void | bin () |
void | ascii () |
TFTP (const char *url, Int_t parallel=1, Int_t wsize=kDfltWindowSize, TSocket *sock=0) | |
virtual | ~TFTP () |
void | SetBlockSize (Int_t blockSize) |
Int_t | GetBlockSize () const |
void | SetRestartAt (Long64_t at) |
Long64_t | GetRestartAt () const |
Int_t | GetMode () const |
Bool_t | IsOpen () const |
void | Print (Option_t *opt="") const |
Long64_t | PutFile (const char *file, const char *remoteName=0) |
Long64_t | GetFile (const char *file, const char *localName=0) |
Bool_t | AccessPathName (const char *path, EAccessMode mode=kFileExists, Bool_t print=kFALSE) |
const char * | GetDirEntry (Bool_t print=kFALSE) |
Int_t | GetPathInfo (const char *path, FileStat_t &buf, Bool_t print=kFALSE) |
Int_t | ChangeDirectory (const char *dir) const |
Int_t | MakeDirectory (const char *dir, Bool_t print=kFALSE) const |
Int_t | DeleteDirectory (const char *dir) const |
Int_t | ListDirectory (Option_t *cmd="") const |
void | FreeDirectory (Bool_t print=kFALSE) |
Bool_t | OpenDirectory (const char *name, Bool_t print=kFALSE) |
Int_t | PrintDirectory () const |
Int_t | RenameFile (const char *file1, const char *file2) const |
Int_t | DeleteFile (const char *file) const |
Int_t | ChangePermission (const char *file, Int_t mode) const |
Int_t | Close () |
void | Binary () |
void | Ascii () |
TSocket * | GetSocket () const |
void | put (const char *file, const char *remoteName=0) |
void | get (const char *file, const char *localName=0) |
void | cd (const char *dir) const |
void | mkdir (const char *dir) const |
void | rmdir (const char *dir) const |
void | ls (Option_t *cmd="") const |
void | pwd () const |
void | mv (const char *file1, const char *file2) const |
void | rm (const char *file) const |
void | chmod (const char *file, Int_t mode) const |
void | bye () |
void | bin () |
void | ascii () |
Private Member Functions | |
TFTP () | |
TFTP (const TFTP &) | |
void | operator= (const TFTP &) |
void | Init (const char *url, Int_t parallel, Int_t wsize) |
void | PrintError (const char *where, Int_t err) const |
Int_t | Recv (Int_t &status, EMessageTypes &kind) const |
void | SetMode (Int_t mode) |
TFTP () | |
TFTP (const TFTP &) | |
void | operator= (const TFTP &) |
void | Init (const char *url, Int_t parallel, Int_t wsize) |
void | PrintError (const char *where, Int_t err) const |
Int_t | Recv (Int_t &status, EMessageTypes &kind) const |
void | SetMode (Int_t mode) |
Private Attributes | |
TString | fHost |
TString | fUser |
Int_t | fPort |
Int_t | fParallel |
Int_t | fWindowSize |
Int_t | fProtocol |
Int_t | fLastBlock |
Int_t | fBlockSize |
Int_t | fMode |
Long64_t | fRestartAt |
TString | fCurrentFile |
TSocket * | fSocket |
Long64_t | fBytesWrite |
connection to rootd | |
Long64_t | fBytesRead |
Bool_t | fDir |
TSocket * | fSocket |
Static Private Attributes | |
static Long64_t | fgBytesWrite |
static Long64_t | fgBytesRead |
Definition at line 42 of file TFTP.h.
TFTP::TFTP | ( | const TFTP & | ) | [private] |
TFTP::TFTP | ( | const char * | url, | |
Int_t | parallel = 1 , |
|||
Int_t | wsize = kDfltWindowSize , |
|||
TSocket * | sock = 0 | |||
) |
TFTP::TFTP | ( | const TFTP & | ) | [private] |
TFTP::TFTP | ( | const char * | url, | |
Int_t | parallel = 1 , |
|||
Int_t | wsize = kDfltWindowSize , |
|||
TSocket * | sock = 0 | |||
) |
virtual TFTP::~TFTP | ( | ) | [virtual] |
void TFTP::operator= | ( | const TFTP & | ) | [private] |
Definition at line 93 of file TFTP.cxx.
References TSeqCollection::Add(), TSocket::CreateAuthSocket(), TObject::Error(), fBlockSize, fBytesRead, fBytesWrite, fHost, fLastBlock, fMode, Form(), fParallel, fPort, fProtocol, fRestartAt, fSocket, fUser, fWindowSize, TUrl::GetHost(), TROOT::GetListOfSockets(), TUrl::GetPort(), TUrl::GetProtocol(), TSocket::GetRemoteProtocol(), TSocket::GetSecContext(), TSecContext::GetUser(), TUrl::GetUser(), gROOT, gROOTMutex, TSocket::IsAuthenticated(), kBinary, kDfltBlockSize, TObject::MakeZombie(), R__LOCKGUARD2, TCollection::Remove(), and SafeDelete.
void TFTP::PrintError | ( | const char * | where, | |
Int_t | err | |||
) | const [private] |
Int_t TFTP::Recv | ( | Int_t & | status, | |
EMessageTypes & | kind | |||
) | const [private] |
Definition at line 188 of file TFTP.cxx.
References fSocket, kROOTD_ERR, n, TSocket::Recv(), and what.
void TFTP::SetMode | ( | Int_t | mode | ) | [inline, private] |
void TFTP::SetBlockSize | ( | Int_t | blockSize | ) |
Int_t TFTP::GetBlockSize | ( | ) | const [inline] |
void TFTP::SetRestartAt | ( | Long64_t | at | ) | [inline] |
Long64_t TFTP::GetRestartAt | ( | ) | const [inline] |
Bool_t TFTP::IsOpen | ( | ) | const [inline] |
Definition at line 93 of file TFTP.h.
References fSocket, kFALSE, and kTRUE.
Referenced by TNetSystem::AccessPathName(), AccessPathName(), ChangeDirectory(), ChangePermission(), Close(), TNetSystem::Create(), DeleteDirectory(), DeleteFile(), FreeDirectory(), TNetSystem::FreeDirectory(), TNetSystem::GetDirEntry(), GetDirEntry(), GetFile(), GetPathInfo(), TNetSystem::GetPathInfo(), ListDirectory(), MakeDirectory(), TNetSystem::MakeDirectory(), OpenDirectory(), TNetSystem::OpenDirectory(), PrintDirectory(), PutFile(), RenameFile(), and TestAuth().
void TFTP::Print | ( | Option_t * | opt = "" |
) | const [virtual] |
Reimplemented from TObject.
Definition at line 155 of file TFTP.cxx.
References TSecContext::AsString(), TString::Data(), fBlockSize, fBytesRead, fBytesWrite, fHost, fMode, fParallel, fPort, fProtocol, fSocket, fUser, fWindowSize, TSocket::GetRemoteProtocol(), TSocket::GetSecContext(), gSystem, TSystem::HostName(), TSocket::IsAuthenticated(), and Printf().
Long64_t TFTP::PutFile | ( | const char * | file, | |
const char * | remoteName = 0 | |||
) |
Definition at line 223 of file TFTP.cxx.
References buf, close, TObject::Error(), fBlockSize, fBytesWrite, fgBytesWrite, flags, fMode, Form(), fRestartAt, fSocket, TSystem::GetErrno(), TSystem::GetPathInfo(), gSystem, id, TObject::Info(), IsOpen(), kROOTD_ERR, kROOTD_PUTFILE, Long64_t, lseek, lseek64(), MAP_FILE, O_BINARY, open, open64(), PrintError(), read, TStopwatch::RealTime(), Recv(), TSystem::ResetErrno(), SEEK_SET, TSocket::Send(), TSocket::SendRaw(), size, TStopwatch::Start(), stat, t, timer, and TObject::Warning().
Referenced by put().
Long64_t TFTP::GetFile | ( | const char * | file, | |
const char * | localName = 0 | |||
) |
Definition at line 396 of file TFTP.cxx.
References bsize, buf, close, TObject::Error(), fBlockSize, fBytesRead, fchmod(), fgBytesRead, fMode, Form(), fRestartAt, fSocket, TSystem::GetErrno(), TSystem::GetFsInfo(), gSystem, i, id, TObject::Info(), IsOpen(), j, kAscii, kBinary, kROOTD_ERR, kROOTD_GETFILE, Long64_t, lseek, lseek64(), n, O_BINARY, open, open64(), PrintError(), TStopwatch::RealTime(), TSocket::Recv(), Recv(), TSocket::RecvRaw(), TSystem::ResetErrno(), SEEK_SET, TSocket::Send(), size, ssize_t, TStopwatch::Start(), stat, TObject::SysError(), t, timer, TObject::Warning(), what, and write.
Referenced by get().
Bool_t TFTP::AccessPathName | ( | const char * | path, | |
EAccessMode | mode = kFileExists , |
|||
Bool_t | print = kFALSE | |||
) |
Definition at line 1107 of file TFTP.cxx.
References TObject::Error(), Form(), fProtocol, fSocket, TObject::Info(), IsOpen(), kFALSE, kROOTD_ACCESS, kTRUE, TSocket::Recv(), and TSocket::Send().
Referenced by TNetSystem::AccessPathName().
Definition at line 985 of file TFTP.cxx.
References TObject::Error(), fDir, fProtocol, fSocket, TObject::Info(), IsOpen(), kROOTD_DIRENTRY, TSocket::Recv(), TSocket::Send(), and strlcpy().
Referenced by TNetSystem::GetDirEntry().
Int_t TFTP::GetPathInfo | ( | const char * | path, | |
FileStat_t & | buf, | |||
Bool_t | print = kFALSE | |||
) |
Definition at line 1024 of file TFTP.cxx.
References buf, TObject::Error(), flags, Form(), fProtocol, fSocket, id, TObject::Info(), IsOpen(), kROOTD_FSTAT, kS_IFDIR, kS_IFREG, kS_IFSOCK, kS_IXGRP, kS_IXOTH, kS_IXUSR, Long64_t, TSocket::Recv(), and TSocket::Send().
Referenced by TNetSystem::GetPathInfo().
Int_t TFTP::ChangeDirectory | ( | const char * | dir | ) | const |
Definition at line 624 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kMESS_STRING, kROOTD_CHDIR, Printf(), TSocket::Recv(), and TSocket::Send().
Referenced by cd().
Definition at line 664 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kROOTD_MKDIR, TSocket::Recv(), and TSocket::Send().
Referenced by TNetSystem::MakeDirectory(), and mkdir().
Int_t TFTP::DeleteDirectory | ( | const char * | dir | ) | const |
Definition at line 699 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kROOTD_RMDIR, TSocket::Recv(), and TSocket::Send().
Referenced by rmdir().
Definition at line 730 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, IsOpen(), kMESS_STRING, kROOTD_LSDIR, TSocket::Recv(), and TSocket::Send().
Referenced by ls().
Definition at line 954 of file TFTP.cxx.
References TObject::Error(), fDir, fProtocol, fSocket, TObject::Info(), IsOpen(), kROOTD_FREEDIR, TSocket::Recv(), and TSocket::Send().
Referenced by TNetSystem::FreeDirectory(), and TNetSystem::OpenDirectory().
Definition at line 910 of file TFTP.cxx.
References TObject::Error(), fDir, Form(), fProtocol, fSocket, TObject::Info(), IsOpen(), kFALSE, kROOTD_OPENDIR, kTRUE, TSocket::Recv(), and TSocket::Send().
Referenced by TNetSystem::OpenDirectory().
Int_t TFTP::PrintDirectory | ( | ) | const |
Definition at line 761 of file TFTP.cxx.
References TObject::Error(), fSocket, TObject::Info(), IsOpen(), kROOTD_PWD, TSocket::Recv(), and TSocket::Send().
Referenced by pwd().
Int_t TFTP::RenameFile | ( | const char * | file1, | |
const char * | file2 | |||
) | const |
Definition at line 787 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kROOTD_MV, TSocket::Recv(), and TSocket::Send().
Referenced by mv().
Int_t TFTP::DeleteFile | ( | const char * | file | ) | const |
Definition at line 818 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kROOTD_RM, TSocket::Recv(), and TSocket::Send().
Referenced by rm().
Definition at line 849 of file TFTP.cxx.
References TObject::Error(), Form(), fSocket, TObject::Info(), IsOpen(), kROOTD_CHMOD, TSocket::Recv(), and TSocket::Send().
Referenced by chmod().
Int_t TFTP::Close | ( | ) |
Definition at line 881 of file TFTP.cxx.
References TObject::Error(), fProtocol, fSocket, TROOT::GetListOfSockets(), gROOT, gROOTMutex, IsOpen(), kROOTD_BYE, kROOTD_CLOSE, R__LOCKGUARD2, TCollection::Remove(), SafeDelete, and TSocket::Send().
Referenced by bye(), TNetSystem::Create(), and ~TFTP().
void TFTP::Binary | ( | ) | [inline] |
void TFTP::Ascii | ( | ) | [inline] |
TSocket* TFTP::GetSocket | ( | ) | const [inline] |
void TFTP::put | ( | const char * | file, | |
const char * | remoteName = 0 | |||
) | [inline] |
void TFTP::get | ( | const char * | file, | |
const char * | localName = 0 | |||
) | [inline] |
void TFTP::cd | ( | const char * | dir | ) | const [inline] |
void TFTP::mkdir | ( | const char * | dir | ) | const [inline] |
void TFTP::rmdir | ( | const char * | dir | ) | const [inline] |
void TFTP::ls | ( | Option_t * | cmd = "" |
) | const [inline, virtual] |
void TFTP::pwd | ( | ) | const [inline] |
void TFTP::mv | ( | const char * | file1, | |
const char * | file2 | |||
) | const [inline] |
void TFTP::rm | ( | const char * | file | ) | const [inline] |
void TFTP::chmod | ( | const char * | file, | |
Int_t | mode | |||
) | const [inline] |
void TFTP::operator= | ( | const TFTP & | ) | [private] |
void TFTP::PrintError | ( | const char * | where, | |
Int_t | err | |||
) | const [private] |
Int_t TFTP::Recv | ( | Int_t & | status, | |
EMessageTypes & | kind | |||
) | const [private] |
void TFTP::SetMode | ( | Int_t | mode | ) | [inline, private] |
void TFTP::SetBlockSize | ( | Int_t | blockSize | ) |
Int_t TFTP::GetBlockSize | ( | ) | const [inline] |
void TFTP::SetRestartAt | ( | Long64_t | at | ) | [inline] |
Long64_t TFTP::GetRestartAt | ( | ) | const [inline] |
Bool_t TFTP::IsOpen | ( | ) | const [inline] |
Long64_t TFTP::PutFile | ( | const char * | file, | |
const char * | remoteName = 0 | |||
) |
Long64_t TFTP::GetFile | ( | const char * | file, | |
const char * | localName = 0 | |||
) |
Bool_t TFTP::AccessPathName | ( | const char * | path, | |
EAccessMode | mode = kFileExists , |
|||
Bool_t | print = kFALSE | |||
) |
Int_t TFTP::GetPathInfo | ( | const char * | path, | |
FileStat_t & | buf, | |||
Bool_t | print = kFALSE | |||
) |
Int_t TFTP::ChangeDirectory | ( | const char * | dir | ) | const |
Int_t TFTP::DeleteDirectory | ( | const char * | dir | ) | const |
Int_t TFTP::PrintDirectory | ( | ) | const |
Int_t TFTP::RenameFile | ( | const char * | file1, | |
const char * | file2 | |||
) | const |
Int_t TFTP::DeleteFile | ( | const char * | file | ) | const |
Int_t TFTP::Close | ( | ) |
void TFTP::Binary | ( | ) | [inline] |
void TFTP::Ascii | ( | ) | [inline] |
TSocket* TFTP::GetSocket | ( | ) | const [inline] |
void TFTP::put | ( | const char * | file, | |
const char * | remoteName = 0 | |||
) | [inline] |
void TFTP::get | ( | const char * | file, | |
const char * | localName = 0 | |||
) | [inline] |
void TFTP::cd | ( | const char * | dir | ) | const [inline] |
void TFTP::mkdir | ( | const char * | dir | ) | const [inline] |
void TFTP::rmdir | ( | const char * | dir | ) | const [inline] |
void TFTP::ls | ( | Option_t * | cmd = "" |
) | const [inline, virtual] |
void TFTP::pwd | ( | ) | const [inline] |
void TFTP::mv | ( | const char * | file1, | |
const char * | file2 | |||
) | const [inline] |
void TFTP::rm | ( | const char * | file | ) | const [inline] |
void TFTP::chmod | ( | const char * | file, | |
Int_t | mode | |||
) | const [inline] |
TString TFTP::fHost [private] |
TString TFTP::fUser [private] |
Int_t TFTP::fPort [private] |
Int_t TFTP::fParallel [private] |
Int_t TFTP::fWindowSize [private] |
Int_t TFTP::fProtocol [private] |
Definition at line 50 of file TFTP.h.
Referenced by AccessPathName(), Close(), FreeDirectory(), GetDirEntry(), GetPathInfo(), Init(), OpenDirectory(), and Print().
Int_t TFTP::fLastBlock [private] |
Int_t TFTP::fBlockSize [private] |
Definition at line 52 of file TFTP.h.
Referenced by GetBlockSize(), GetFile(), Init(), Print(), PutFile(), and SetBlockSize().
Int_t TFTP::fMode [private] |
Long64_t TFTP::fRestartAt [private] |
Definition at line 54 of file TFTP.h.
Referenced by GetFile(), GetRestartAt(), Init(), PutFile(), and SetRestartAt().
TString TFTP::fCurrentFile [private] |
TSocket* TFTP::fSocket [private] |
Definition at line 56 of file TFTP.h.
Referenced by AccessPathName(), ChangeDirectory(), ChangePermission(), Close(), DeleteDirectory(), DeleteFile(), FreeDirectory(), GetDirEntry(), GetFile(), GetPathInfo(), GetSocket(), Init(), IsOpen(), ListDirectory(), MakeDirectory(), OpenDirectory(), Print(), PrintDirectory(), PutFile(), Recv(), and RenameFile().
Long64_t TFTP::fBytesWrite [private] |
Long64_t TFTP::fBytesRead [private] |
Bool_t TFTP::fDir [private] |
Definition at line 59 of file TFTP.h.
Referenced by FreeDirectory(), GetDirEntry(), and OpenDirectory().
Long64_t TFTP::fgBytesWrite [static, private] |
Long64_t TFTP::fgBytesRead [static, private] |
TSocket* TFTP::fSocket [private] |