library: libCore
#include "TNetFile.h"


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

class TNetSystem : public TSystem

Inheritance Chart:
virtual void* GetDirPtr() const public:
TNetSystem() TNetSystem(const char* url) TNetSystem(const TNetSystem&) 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) const 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) TNetSystem& operator=(const TNetSystem&) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

Bool_t fDir true if a directory is open remotely void* fDirp directory handler TFTP* fFTP Connection to rootd TString fHost Remote host TString fUser Remote user

Class Description

 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:                                            
 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                           
   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:   
 If the protocol is specified as "rootk" kerberos5 will be used for   
 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:       

TNetSystem() : TSystem("-root", "Net file Helper System")
 Create helper class that allows directory access via rootd.

TNetSystem(const char *url) : TSystem("-root", "Net file Helper System")
 Create helper class that allows directory access via rootd.


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'.

Inline Functions

              void* GetDirPtr() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         TNetSystem TNetSystem(const TNetSystem&)
        TNetSystem& operator=(const TNetSystem&)

Author: Fons Rademakers 14/08/97
Last update: root/net:$Name: $:$Id: TNetFile.cxx,v 1.62 2005/09/05 10:28:08 rdm 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.