library: libCore
#include "TNetFile.h"

TNetSystem


class description - header file - source file - inheritance tree (.pdf)

class TNetSystem : public TSystem

Inheritance Chart:
TObject
<-
TNamed
<-
TSystem
<-
TNetSystem
<-
TXNetSystem
    private:
virtual void* GetDirPtr() const protected:
TNetSystem(const TNetSystem&) void Create(const char* url, TSocket* sock = 0) void InitRemoteEntity(const char* url) TNetSystem& operator=(const TNetSystem&) public:
TNetSystem(Bool_t ftpowner = kTRUE) TNetSystem(const char* url, Bool_t ftpowner = kTRUE) virtual ~TNetSystem() virtual Bool_t AccessPathName(const char* path, EAccessMode mode) static TClass* Class() virtual Bool_t ConsistentWith(const char* path, void* dirptr) virtual void FreeDirectory(void* dirp = 0) virtual const char* GetDirEntry(void* dirp = 0) virtual Int_t GetPathInfo(const char* path, FileStat_t& buf) virtual TClass* IsA() const virtual Int_t MakeDirectory(const char* name) virtual void* OpenDirectory(const char* name) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
Bool_t fDir true if a directory is open remotely void* fDirp directory handler TFTP* fFTP Connection to rootd TString fHost Remote host Bool_t fFTPOwner True if owner of the FTP instance TString fUser Remote user Int_t fPort Remote port

Class Description

                                                                      
 TNetFile                                                             
                                                                      
 A TNetFile is like a normal TFile except that it reads and writes    
 its data via a rootd server (for more on the rootd daemon see the    
 source files root/rootd/src/*.cxx). TNetFile file names are in       
 standard URL format with protocol "root" or "roots". The following   
 are valid TNetFile URL's:                                            
                                                                      
    roots://hpsalo/files/aap.root                                     
    root://hpbrun.cern.ch/root/hsimple.root                           
    root://pcna49a:5151/~na49/data/run821.root                        
    root://pcna49d.cern.ch:5050//v1/data/run810.root                  
                                                                      
 The only difference with the well known httpd URL's is that the root 
 of the remote file tree is the user's home directory. Therefore an   
 absolute pathname requires a // after the host or port specifier     
 (see last example). Further the expansion of the standard shell      
 characters, like ~, $, .., are handled as expected.                  
 TNetFile (actually TUrl) uses 1094 as default port for rootd.        
                                                                      
 Connecting to a rootd requires the remote user id and password.      
 TNetFile allows three ways for you to provide your login:            
   1) Setting it globally via the static functions:                   
         TAuthenticate::SetGlobalUser() and                           
         TAuthenticate::SetGlobalPasswd()                             
   2) Getting it from the ~/.netrc file (same file as used by ftp)    
   3) Command line prompt                                             
 The different methods will be tried in the order given above.        
 On machines with AFS rootd will authenticate using AFS (if it was    
 compiled with AFS support).                                          
                                                                      
 If the protocol is specified as "roots" a secure authetication       
 method will be used. The secure method uses the SRP, Secure Remote   
 Passwords, package. SRP uses a so called "asymmetric key exchange    //
 protocol" in which no passwords are ever send over the wire. This    //
 protocol is safe against all known security attacks. For more see:   
 
NetFile //
                                                             
 If the protocol is specified as "rootk" kerberos5 will be used for   
 authentication.                                                      
                                                                      
 The rootd daemon lives in the directory $ROOTSYS/bin. It can be      
 started either via inetd or by hand from the command line (no need   
 to be super user). For more info about rootd see the web page:       
 
NetFile //
                                                             
                                                                      

TNetSystem(Bool_t ftpowner)
 Create helper class that allows directory access via rootd.
 Use ftpowner = TRUE (default) if this instance is responsible
 for cleaning of the underlying TFTP connection; this allows
 to have control on the order of the final cleaning.
TNetSystem(const char *url, Bool_t ftpowner)
 Create helper class that allows directory access via rootd.
 Use ftpowner = TRUE (default) if this instance is responsible
 for cleaning of the underlying TFTP connection; this allows
 to have control on the order of the final cleaning.
TNetSystem(const TNetSystem& ns)
copy constructor
TNetSystem& operator=(const TNetSystem& ns)
assignement operator
void InitRemoteEntity(const char *url)
 Parse and save coordinates of the remote entity (user, host, port, ...)
void Create(const char *url, TSocket *sock)
 Create a TNetSystem object.
~TNetSystem()
 Destructor
Int_t MakeDirectory(const char *dir)
 Make a directory via rootd.
void * OpenDirectory(const char *dir)
 Open a directory via rfiod. Returns an opaque pointer to a dir
 structure. Returns 0 in case of error.
void FreeDirectory(void *dirp)
 Free directory via rootd.
const char * GetDirEntry(void *dirp)
 Get directory entry via rootd. Returns 0 in case no more entries.
Int_t GetPathInfo(const char *path, FileStat_t &buf)
 Get info about a file. Info is returned in the form of a FileStat_t
 structure (see TSystem.h).
 The function returns 0 in case of success and 1 if the file could
 not be stat'ed.
Bool_t AccessPathName(const char *path, EAccessMode mode)
 Returns FALSE if one can access a file using the specified access mode.
 Mode is the same as for the Unix access(2) function.
 Attention, bizarre convention of return value!!
Bool_t ConsistentWith(const char *path, void *dirptr)
 Check consistency of this helper with the one required
 by 'path' or 'dirptr'.

Author: Fons Rademakers 14/08/97
Last update: root/net:$Name: $:$Id: TNetFile.cxx,v 1.81 2006/07/10 14:31:28 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.